| 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.surveys.v2; | 3 library googleapis.surveys.v2; |
| 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, Media, UploadOptions, | 13 show |
| 14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, | 14 ApiRequestError, |
| 15 ByteRange; | 15 DetailedApiRequestError, |
| 16 Media, |
| 17 UploadOptions, |
| 18 ResumableUploadOptions, |
| 19 DownloadOptions, |
| 20 PartialDownloadOptions, |
| 21 ByteRange; |
| 16 | 22 |
| 17 const core.String USER_AGENT = 'dart-api-client surveys/v2'; | 23 const core.String USER_AGENT = 'dart-api-client surveys/v2'; |
| 18 | 24 |
| 19 /** | 25 /// Creates and conducts surveys, lists the surveys that an authenticated user |
| 20 * Creates and conducts surveys, lists the surveys that an authenticated user | 26 /// owns, and retrieves survey results and information about specified surveys. |
| 21 * owns, and retrieves survey results and information about specified surveys. | |
| 22 */ | |
| 23 class SurveysApi { | 27 class SurveysApi { |
| 24 /** View and manage your surveys and results */ | 28 /// View and manage your surveys and results |
| 25 static const SurveysScope = "https://www.googleapis.com/auth/surveys"; | 29 static const SurveysScope = "https://www.googleapis.com/auth/surveys"; |
| 26 | 30 |
| 27 /** View your surveys and survey results */ | 31 /// View your surveys and survey results |
| 28 static const SurveysReadonlyScope = "https://www.googleapis.com/auth/surveys.r
eadonly"; | 32 static const SurveysReadonlyScope = |
| 33 "https://www.googleapis.com/auth/surveys.readonly"; |
| 29 | 34 |
| 30 /** View your email address */ | 35 /// View your email address |
| 31 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em
ail"; | 36 static const UserinfoEmailScope = |
| 32 | 37 "https://www.googleapis.com/auth/userinfo.email"; |
| 33 | 38 |
| 34 final commons.ApiRequester _requester; | 39 final commons.ApiRequester _requester; |
| 35 | 40 |
| 36 MobileapppanelsResourceApi get mobileapppanels => new MobileapppanelsResourceA
pi(_requester); | 41 MobileapppanelsResourceApi get mobileapppanels => |
| 42 new MobileapppanelsResourceApi(_requester); |
| 37 ResultsResourceApi get results => new ResultsResourceApi(_requester); | 43 ResultsResourceApi get results => new ResultsResourceApi(_requester); |
| 38 SurveysResourceApi get surveys => new SurveysResourceApi(_requester); | 44 SurveysResourceApi get surveys => new SurveysResourceApi(_requester); |
| 39 | 45 |
| 40 SurveysApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "surveys/v2/"}) : | 46 SurveysApi(http.Client client, |
| 41 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 47 {core.String rootUrl: "https://www.googleapis.com/", |
| 48 core.String servicePath: "surveys/v2/"}) |
| 49 : _requester = |
| 50 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 42 } | 51 } |
| 43 | 52 |
| 44 | |
| 45 class MobileapppanelsResourceApi { | 53 class MobileapppanelsResourceApi { |
| 46 final commons.ApiRequester _requester; | 54 final commons.ApiRequester _requester; |
| 47 | 55 |
| 48 MobileapppanelsResourceApi(commons.ApiRequester client) : | 56 MobileapppanelsResourceApi(commons.ApiRequester client) : _requester = client; |
| 49 _requester = client; | |
| 50 | 57 |
| 51 /** | 58 /// Retrieves a MobileAppPanel that is available to the authenticated user. |
| 52 * Retrieves a MobileAppPanel that is available to the authenticated user. | 59 /// |
| 53 * | 60 /// Request parameters: |
| 54 * Request parameters: | 61 /// |
| 55 * | 62 /// [panelId] - External URL ID for the panel. |
| 56 * [panelId] - External URL ID for the panel. | 63 /// |
| 57 * | 64 /// Completes with a [MobileAppPanel]. |
| 58 * Completes with a [MobileAppPanel]. | 65 /// |
| 59 * | 66 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 60 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 67 /// an error. |
| 61 * error. | 68 /// |
| 62 * | 69 /// If the used [http.Client] completes with an error when making a REST |
| 63 * If the used [http.Client] completes with an error when making a REST call, | 70 /// call, this method will complete with the same error. |
| 64 * this method will complete with the same error. | |
| 65 */ | |
| 66 async.Future<MobileAppPanel> get(core.String panelId) { | 71 async.Future<MobileAppPanel> get(core.String panelId) { |
| 67 var _url = null; | 72 var _url = null; |
| 68 var _queryParams = new core.Map(); | 73 var _queryParams = new core.Map(); |
| 69 var _uploadMedia = null; | 74 var _uploadMedia = null; |
| 70 var _uploadOptions = null; | 75 var _uploadOptions = null; |
| 71 var _downloadOptions = commons.DownloadOptions.Metadata; | 76 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 72 var _body = null; | 77 var _body = null; |
| 73 | 78 |
| 74 if (panelId == null) { | 79 if (panelId == null) { |
| 75 throw new core.ArgumentError("Parameter panelId is required."); | 80 throw new core.ArgumentError("Parameter panelId is required."); |
| 76 } | 81 } |
| 77 | 82 |
| 78 _url = 'mobileAppPanels/' + commons.Escaper.ecapeVariable('$panelId'); | 83 _url = 'mobileAppPanels/' + commons.Escaper.ecapeVariable('$panelId'); |
| 79 | 84 |
| 80 var _response = _requester.request(_url, | 85 var _response = _requester.request(_url, "GET", |
| 81 "GET", | 86 body: _body, |
| 82 body: _body, | 87 queryParams: _queryParams, |
| 83 queryParams: _queryParams, | 88 uploadOptions: _uploadOptions, |
| 84 uploadOptions: _uploadOptions, | 89 uploadMedia: _uploadMedia, |
| 85 uploadMedia: _uploadMedia, | 90 downloadOptions: _downloadOptions); |
| 86 downloadOptions: _downloadOptions); | |
| 87 return _response.then((data) => new MobileAppPanel.fromJson(data)); | 91 return _response.then((data) => new MobileAppPanel.fromJson(data)); |
| 88 } | 92 } |
| 89 | 93 |
| 90 /** | 94 /// Lists the MobileAppPanels available to the authenticated user. |
| 91 * Lists the MobileAppPanels available to the authenticated user. | 95 /// |
| 92 * | 96 /// Request parameters: |
| 93 * Request parameters: | 97 /// |
| 94 * | 98 /// [maxResults] - null |
| 95 * [maxResults] - null | 99 /// |
| 96 * | 100 /// [startIndex] - null |
| 97 * [startIndex] - null | 101 /// |
| 98 * | 102 /// [token] - null |
| 99 * [token] - null | 103 /// |
| 100 * | 104 /// Completes with a [MobileAppPanelsListResponse]. |
| 101 * Completes with a [MobileAppPanelsListResponse]. | 105 /// |
| 102 * | 106 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 103 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 107 /// an error. |
| 104 * error. | 108 /// |
| 105 * | 109 /// If the used [http.Client] completes with an error when making a REST |
| 106 * If the used [http.Client] completes with an error when making a REST call, | 110 /// call, this method will complete with the same error. |
| 107 * this method will complete with the same error. | 111 async.Future<MobileAppPanelsListResponse> list( |
| 108 */ | 112 {core.int maxResults, core.int startIndex, core.String token}) { |
| 109 async.Future<MobileAppPanelsListResponse> list({core.int maxResults, core.int
startIndex, core.String token}) { | |
| 110 var _url = null; | 113 var _url = null; |
| 111 var _queryParams = new core.Map(); | 114 var _queryParams = new core.Map(); |
| 112 var _uploadMedia = null; | 115 var _uploadMedia = null; |
| 113 var _uploadOptions = null; | 116 var _uploadOptions = null; |
| 114 var _downloadOptions = commons.DownloadOptions.Metadata; | 117 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 115 var _body = null; | 118 var _body = null; |
| 116 | 119 |
| 117 if (maxResults != null) { | 120 if (maxResults != null) { |
| 118 _queryParams["maxResults"] = ["${maxResults}"]; | 121 _queryParams["maxResults"] = ["${maxResults}"]; |
| 119 } | 122 } |
| 120 if (startIndex != null) { | 123 if (startIndex != null) { |
| 121 _queryParams["startIndex"] = ["${startIndex}"]; | 124 _queryParams["startIndex"] = ["${startIndex}"]; |
| 122 } | 125 } |
| 123 if (token != null) { | 126 if (token != null) { |
| 124 _queryParams["token"] = [token]; | 127 _queryParams["token"] = [token]; |
| 125 } | 128 } |
| 126 | 129 |
| 127 _url = 'mobileAppPanels'; | 130 _url = 'mobileAppPanels'; |
| 128 | 131 |
| 129 var _response = _requester.request(_url, | 132 var _response = _requester.request(_url, "GET", |
| 130 "GET", | 133 body: _body, |
| 131 body: _body, | 134 queryParams: _queryParams, |
| 132 queryParams: _queryParams, | 135 uploadOptions: _uploadOptions, |
| 133 uploadOptions: _uploadOptions, | 136 uploadMedia: _uploadMedia, |
| 134 uploadMedia: _uploadMedia, | 137 downloadOptions: _downloadOptions); |
| 135 downloadOptions: _downloadOptions); | 138 return _response |
| 136 return _response.then((data) => new MobileAppPanelsListResponse.fromJson(dat
a)); | 139 .then((data) => new MobileAppPanelsListResponse.fromJson(data)); |
| 137 } | 140 } |
| 138 | 141 |
| 139 /** | 142 /// Updates a MobileAppPanel. Currently the only property that can be updated |
| 140 * Updates a MobileAppPanel. Currently the only property that can be updated | 143 /// is the owners property. |
| 141 * is the owners property. | 144 /// |
| 142 * | 145 /// [request] - The metadata request object. |
| 143 * [request] - The metadata request object. | 146 /// |
| 144 * | 147 /// Request parameters: |
| 145 * Request parameters: | 148 /// |
| 146 * | 149 /// [panelId] - External URL ID for the panel. |
| 147 * [panelId] - External URL ID for the panel. | 150 /// |
| 148 * | 151 /// Completes with a [MobileAppPanel]. |
| 149 * Completes with a [MobileAppPanel]. | 152 /// |
| 150 * | 153 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 151 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 154 /// an error. |
| 152 * error. | 155 /// |
| 153 * | 156 /// If the used [http.Client] completes with an error when making a REST |
| 154 * If the used [http.Client] completes with an error when making a REST call, | 157 /// call, this method will complete with the same error. |
| 155 * this method will complete with the same error. | 158 async.Future<MobileAppPanel> update( |
| 156 */ | 159 MobileAppPanel request, core.String panelId) { |
| 157 async.Future<MobileAppPanel> update(MobileAppPanel request, core.String panelI
d) { | |
| 158 var _url = null; | 160 var _url = null; |
| 159 var _queryParams = new core.Map(); | 161 var _queryParams = new core.Map(); |
| 160 var _uploadMedia = null; | 162 var _uploadMedia = null; |
| 161 var _uploadOptions = null; | 163 var _uploadOptions = null; |
| 162 var _downloadOptions = commons.DownloadOptions.Metadata; | 164 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 163 var _body = null; | 165 var _body = null; |
| 164 | 166 |
| 165 if (request != null) { | 167 if (request != null) { |
| 166 _body = convert.JSON.encode((request).toJson()); | 168 _body = convert.JSON.encode((request).toJson()); |
| 167 } | 169 } |
| 168 if (panelId == null) { | 170 if (panelId == null) { |
| 169 throw new core.ArgumentError("Parameter panelId is required."); | 171 throw new core.ArgumentError("Parameter panelId is required."); |
| 170 } | 172 } |
| 171 | 173 |
| 172 _url = 'mobileAppPanels/' + commons.Escaper.ecapeVariable('$panelId'); | 174 _url = 'mobileAppPanels/' + commons.Escaper.ecapeVariable('$panelId'); |
| 173 | 175 |
| 174 var _response = _requester.request(_url, | 176 var _response = _requester.request(_url, "PUT", |
| 175 "PUT", | 177 body: _body, |
| 176 body: _body, | 178 queryParams: _queryParams, |
| 177 queryParams: _queryParams, | 179 uploadOptions: _uploadOptions, |
| 178 uploadOptions: _uploadOptions, | 180 uploadMedia: _uploadMedia, |
| 179 uploadMedia: _uploadMedia, | 181 downloadOptions: _downloadOptions); |
| 180 downloadOptions: _downloadOptions); | |
| 181 return _response.then((data) => new MobileAppPanel.fromJson(data)); | 182 return _response.then((data) => new MobileAppPanel.fromJson(data)); |
| 182 } | 183 } |
| 183 | |
| 184 } | 184 } |
| 185 | 185 |
| 186 | |
| 187 class ResultsResourceApi { | 186 class ResultsResourceApi { |
| 188 final commons.ApiRequester _requester; | 187 final commons.ApiRequester _requester; |
| 189 | 188 |
| 190 ResultsResourceApi(commons.ApiRequester client) : | 189 ResultsResourceApi(commons.ApiRequester client) : _requester = client; |
| 191 _requester = client; | |
| 192 | 190 |
| 193 /** | 191 /// Retrieves any survey results that have been produced so far. Results are |
| 194 * Retrieves any survey results that have been produced so far. Results are | 192 /// formatted as an Excel file. You must add "?alt=media" to the URL as an |
| 195 * formatted as an Excel file. You must add "?alt=media" to the URL as an | 193 /// argument to get results. |
| 196 * argument to get results. | 194 /// |
| 197 * | 195 /// [request] - The metadata request object. |
| 198 * [request] - The metadata request object. | 196 /// |
| 199 * | 197 /// Request parameters: |
| 200 * Request parameters: | 198 /// |
| 201 * | 199 /// [surveyUrlId] - External URL ID for the survey. |
| 202 * [surveyUrlId] - External URL ID for the survey. | 200 /// |
| 203 * | 201 /// [downloadOptions] - Options for downloading. A download can be either a |
| 204 * [downloadOptions] - Options for downloading. A download can be either a | 202 /// Metadata (default) or Media download. Partial Media downloads are |
| 205 * Metadata (default) or Media download. Partial Media downloads are possible | 203 /// possible as well. |
| 206 * as well. | 204 /// |
| 207 * | 205 /// Completes with a |
| 208 * Completes with a | 206 /// |
| 209 * | 207 /// - [SurveyResults] for Metadata downloads (see [downloadOptions]). |
| 210 * - [SurveyResults] for Metadata downloads (see [downloadOptions]). | 208 /// |
| 211 * | 209 /// - [commons.Media] for Media downloads (see [downloadOptions]). |
| 212 * - [commons.Media] for Media downloads (see [downloadOptions]). | 210 /// |
| 213 * | 211 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 214 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 212 /// an error. |
| 215 * error. | 213 /// |
| 216 * | 214 /// If the used [http.Client] completes with an error when making a REST |
| 217 * If the used [http.Client] completes with an error when making a REST call, | 215 /// call, this method will complete with the same error. |
| 218 * this method will complete with the same error. | 216 async.Future get(ResultsGetRequest request, core.String surveyUrlId, |
| 219 */ | 217 {commons.DownloadOptions downloadOptions: |
| 220 async.Future get(ResultsGetRequest request, core.String surveyUrlId, {commons.
DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { | 218 commons.DownloadOptions.Metadata}) { |
| 221 var _url = null; | 219 var _url = null; |
| 222 var _queryParams = new core.Map(); | 220 var _queryParams = new core.Map(); |
| 223 var _uploadMedia = null; | 221 var _uploadMedia = null; |
| 224 var _uploadOptions = null; | 222 var _uploadOptions = null; |
| 225 var _downloadOptions = commons.DownloadOptions.Metadata; | 223 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 226 var _body = null; | 224 var _body = null; |
| 227 | 225 |
| 228 if (request != null) { | 226 if (request != null) { |
| 229 _body = convert.JSON.encode((request).toJson()); | 227 _body = convert.JSON.encode((request).toJson()); |
| 230 } | 228 } |
| 231 if (surveyUrlId == null) { | 229 if (surveyUrlId == null) { |
| 232 throw new core.ArgumentError("Parameter surveyUrlId is required."); | 230 throw new core.ArgumentError("Parameter surveyUrlId is required."); |
| 233 } | 231 } |
| 234 | 232 |
| 235 _downloadOptions = downloadOptions; | 233 _downloadOptions = downloadOptions; |
| 236 | 234 |
| 237 _url = 'surveys/' + commons.Escaper.ecapeVariable('$surveyUrlId') + '/result
s'; | 235 _url = |
| 236 'surveys/' + commons.Escaper.ecapeVariable('$surveyUrlId') + '/results'; |
| 238 | 237 |
| 239 var _response = _requester.request(_url, | 238 var _response = _requester.request(_url, "GET", |
| 240 "GET", | 239 body: _body, |
| 241 body: _body, | 240 queryParams: _queryParams, |
| 242 queryParams: _queryParams, | 241 uploadOptions: _uploadOptions, |
| 243 uploadOptions: _uploadOptions, | 242 uploadMedia: _uploadMedia, |
| 244 uploadMedia: _uploadMedia, | 243 downloadOptions: _downloadOptions); |
| 245 downloadOptions: _downloadOptions); | |
| 246 if (_downloadOptions == null || | 244 if (_downloadOptions == null || |
| 247 _downloadOptions == commons.DownloadOptions.Metadata) { | 245 _downloadOptions == commons.DownloadOptions.Metadata) { |
| 248 return _response.then((data) => new SurveyResults.fromJson(data)); | 246 return _response.then((data) => new SurveyResults.fromJson(data)); |
| 249 } else { | 247 } else { |
| 250 return _response; | 248 return _response; |
| 251 } | 249 } |
| 252 } | 250 } |
| 253 | |
| 254 } | 251 } |
| 255 | 252 |
| 256 | |
| 257 class SurveysResourceApi { | 253 class SurveysResourceApi { |
| 258 final commons.ApiRequester _requester; | 254 final commons.ApiRequester _requester; |
| 259 | 255 |
| 260 SurveysResourceApi(commons.ApiRequester client) : | 256 SurveysResourceApi(commons.ApiRequester client) : _requester = client; |
| 261 _requester = client; | |
| 262 | 257 |
| 263 /** | 258 /// Removes a survey from view in all user GET requests. |
| 264 * Removes a survey from view in all user GET requests. | 259 /// |
| 265 * | 260 /// Request parameters: |
| 266 * Request parameters: | 261 /// |
| 267 * | 262 /// [surveyUrlId] - External URL ID for the survey. |
| 268 * [surveyUrlId] - External URL ID for the survey. | 263 /// |
| 269 * | 264 /// Completes with a [SurveysDeleteResponse]. |
| 270 * Completes with a [SurveysDeleteResponse]. | 265 /// |
| 271 * | 266 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 272 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 267 /// an error. |
| 273 * error. | 268 /// |
| 274 * | 269 /// If the used [http.Client] completes with an error when making a REST |
| 275 * If the used [http.Client] completes with an error when making a REST call, | 270 /// call, this method will complete with the same error. |
| 276 * this method will complete with the same error. | |
| 277 */ | |
| 278 async.Future<SurveysDeleteResponse> delete(core.String surveyUrlId) { | 271 async.Future<SurveysDeleteResponse> delete(core.String surveyUrlId) { |
| 279 var _url = null; | 272 var _url = null; |
| 280 var _queryParams = new core.Map(); | 273 var _queryParams = new core.Map(); |
| 281 var _uploadMedia = null; | 274 var _uploadMedia = null; |
| 282 var _uploadOptions = null; | 275 var _uploadOptions = null; |
| 283 var _downloadOptions = commons.DownloadOptions.Metadata; | 276 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 284 var _body = null; | 277 var _body = null; |
| 285 | 278 |
| 286 if (surveyUrlId == null) { | 279 if (surveyUrlId == null) { |
| 287 throw new core.ArgumentError("Parameter surveyUrlId is required."); | 280 throw new core.ArgumentError("Parameter surveyUrlId is required."); |
| 288 } | 281 } |
| 289 | 282 |
| 290 _url = 'surveys/' + commons.Escaper.ecapeVariable('$surveyUrlId'); | 283 _url = 'surveys/' + commons.Escaper.ecapeVariable('$surveyUrlId'); |
| 291 | 284 |
| 292 var _response = _requester.request(_url, | 285 var _response = _requester.request(_url, "DELETE", |
| 293 "DELETE", | 286 body: _body, |
| 294 body: _body, | 287 queryParams: _queryParams, |
| 295 queryParams: _queryParams, | 288 uploadOptions: _uploadOptions, |
| 296 uploadOptions: _uploadOptions, | 289 uploadMedia: _uploadMedia, |
| 297 uploadMedia: _uploadMedia, | 290 downloadOptions: _downloadOptions); |
| 298 downloadOptions: _downloadOptions); | |
| 299 return _response.then((data) => new SurveysDeleteResponse.fromJson(data)); | 291 return _response.then((data) => new SurveysDeleteResponse.fromJson(data)); |
| 300 } | 292 } |
| 301 | 293 |
| 302 /** | 294 /// Retrieves information about the specified survey. |
| 303 * Retrieves information about the specified survey. | 295 /// |
| 304 * | 296 /// Request parameters: |
| 305 * Request parameters: | 297 /// |
| 306 * | 298 /// [surveyUrlId] - External URL ID for the survey. |
| 307 * [surveyUrlId] - External URL ID for the survey. | 299 /// |
| 308 * | 300 /// Completes with a [Survey]. |
| 309 * Completes with a [Survey]. | 301 /// |
| 310 * | 302 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 311 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 303 /// an error. |
| 312 * error. | 304 /// |
| 313 * | 305 /// If the used [http.Client] completes with an error when making a REST |
| 314 * If the used [http.Client] completes with an error when making a REST call, | 306 /// call, this method will complete with the same error. |
| 315 * this method will complete with the same error. | |
| 316 */ | |
| 317 async.Future<Survey> get(core.String surveyUrlId) { | 307 async.Future<Survey> get(core.String surveyUrlId) { |
| 318 var _url = null; | 308 var _url = null; |
| 319 var _queryParams = new core.Map(); | 309 var _queryParams = new core.Map(); |
| 320 var _uploadMedia = null; | 310 var _uploadMedia = null; |
| 321 var _uploadOptions = null; | 311 var _uploadOptions = null; |
| 322 var _downloadOptions = commons.DownloadOptions.Metadata; | 312 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 323 var _body = null; | 313 var _body = null; |
| 324 | 314 |
| 325 if (surveyUrlId == null) { | 315 if (surveyUrlId == null) { |
| 326 throw new core.ArgumentError("Parameter surveyUrlId is required."); | 316 throw new core.ArgumentError("Parameter surveyUrlId is required."); |
| 327 } | 317 } |
| 328 | 318 |
| 329 _url = 'surveys/' + commons.Escaper.ecapeVariable('$surveyUrlId'); | 319 _url = 'surveys/' + commons.Escaper.ecapeVariable('$surveyUrlId'); |
| 330 | 320 |
| 331 var _response = _requester.request(_url, | 321 var _response = _requester.request(_url, "GET", |
| 332 "GET", | 322 body: _body, |
| 333 body: _body, | 323 queryParams: _queryParams, |
| 334 queryParams: _queryParams, | 324 uploadOptions: _uploadOptions, |
| 335 uploadOptions: _uploadOptions, | 325 uploadMedia: _uploadMedia, |
| 336 uploadMedia: _uploadMedia, | 326 downloadOptions: _downloadOptions); |
| 337 downloadOptions: _downloadOptions); | |
| 338 return _response.then((data) => new Survey.fromJson(data)); | 327 return _response.then((data) => new Survey.fromJson(data)); |
| 339 } | 328 } |
| 340 | 329 |
| 341 /** | 330 /// Creates a survey. |
| 342 * Creates a survey. | 331 /// |
| 343 * | 332 /// [request] - The metadata request object. |
| 344 * [request] - The metadata request object. | 333 /// |
| 345 * | 334 /// Request parameters: |
| 346 * Request parameters: | 335 /// |
| 347 * | 336 /// Completes with a [Survey]. |
| 348 * Completes with a [Survey]. | 337 /// |
| 349 * | 338 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 350 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 339 /// an error. |
| 351 * error. | 340 /// |
| 352 * | 341 /// If the used [http.Client] completes with an error when making a REST |
| 353 * If the used [http.Client] completes with an error when making a REST call, | 342 /// call, this method will complete with the same error. |
| 354 * this method will complete with the same error. | |
| 355 */ | |
| 356 async.Future<Survey> insert(Survey request) { | 343 async.Future<Survey> insert(Survey request) { |
| 357 var _url = null; | 344 var _url = null; |
| 358 var _queryParams = new core.Map(); | 345 var _queryParams = new core.Map(); |
| 359 var _uploadMedia = null; | 346 var _uploadMedia = null; |
| 360 var _uploadOptions = null; | 347 var _uploadOptions = null; |
| 361 var _downloadOptions = commons.DownloadOptions.Metadata; | 348 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 362 var _body = null; | 349 var _body = null; |
| 363 | 350 |
| 364 if (request != null) { | 351 if (request != null) { |
| 365 _body = convert.JSON.encode((request).toJson()); | 352 _body = convert.JSON.encode((request).toJson()); |
| 366 } | 353 } |
| 367 | 354 |
| 368 _url = 'surveys'; | 355 _url = 'surveys'; |
| 369 | 356 |
| 370 var _response = _requester.request(_url, | 357 var _response = _requester.request(_url, "POST", |
| 371 "POST", | 358 body: _body, |
| 372 body: _body, | 359 queryParams: _queryParams, |
| 373 queryParams: _queryParams, | 360 uploadOptions: _uploadOptions, |
| 374 uploadOptions: _uploadOptions, | 361 uploadMedia: _uploadMedia, |
| 375 uploadMedia: _uploadMedia, | 362 downloadOptions: _downloadOptions); |
| 376 downloadOptions: _downloadOptions); | |
| 377 return _response.then((data) => new Survey.fromJson(data)); | 363 return _response.then((data) => new Survey.fromJson(data)); |
| 378 } | 364 } |
| 379 | 365 |
| 380 /** | 366 /// Lists the surveys owned by the authenticated user. |
| 381 * Lists the surveys owned by the authenticated user. | 367 /// |
| 382 * | 368 /// Request parameters: |
| 383 * Request parameters: | 369 /// |
| 384 * | 370 /// [maxResults] - null |
| 385 * [maxResults] - null | 371 /// |
| 386 * | 372 /// [startIndex] - null |
| 387 * [startIndex] - null | 373 /// |
| 388 * | 374 /// [token] - null |
| 389 * [token] - null | 375 /// |
| 390 * | 376 /// Completes with a [SurveysListResponse]. |
| 391 * Completes with a [SurveysListResponse]. | 377 /// |
| 392 * | 378 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 393 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 379 /// an error. |
| 394 * error. | 380 /// |
| 395 * | 381 /// If the used [http.Client] completes with an error when making a REST |
| 396 * If the used [http.Client] completes with an error when making a REST call, | 382 /// call, this method will complete with the same error. |
| 397 * this method will complete with the same error. | 383 async.Future<SurveysListResponse> list( |
| 398 */ | 384 {core.int maxResults, core.int startIndex, core.String token}) { |
| 399 async.Future<SurveysListResponse> list({core.int maxResults, core.int startInd
ex, core.String token}) { | |
| 400 var _url = null; | 385 var _url = null; |
| 401 var _queryParams = new core.Map(); | 386 var _queryParams = new core.Map(); |
| 402 var _uploadMedia = null; | 387 var _uploadMedia = null; |
| 403 var _uploadOptions = null; | 388 var _uploadOptions = null; |
| 404 var _downloadOptions = commons.DownloadOptions.Metadata; | 389 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 405 var _body = null; | 390 var _body = null; |
| 406 | 391 |
| 407 if (maxResults != null) { | 392 if (maxResults != null) { |
| 408 _queryParams["maxResults"] = ["${maxResults}"]; | 393 _queryParams["maxResults"] = ["${maxResults}"]; |
| 409 } | 394 } |
| 410 if (startIndex != null) { | 395 if (startIndex != null) { |
| 411 _queryParams["startIndex"] = ["${startIndex}"]; | 396 _queryParams["startIndex"] = ["${startIndex}"]; |
| 412 } | 397 } |
| 413 if (token != null) { | 398 if (token != null) { |
| 414 _queryParams["token"] = [token]; | 399 _queryParams["token"] = [token]; |
| 415 } | 400 } |
| 416 | 401 |
| 417 _url = 'surveys'; | 402 _url = 'surveys'; |
| 418 | 403 |
| 419 var _response = _requester.request(_url, | 404 var _response = _requester.request(_url, "GET", |
| 420 "GET", | 405 body: _body, |
| 421 body: _body, | 406 queryParams: _queryParams, |
| 422 queryParams: _queryParams, | 407 uploadOptions: _uploadOptions, |
| 423 uploadOptions: _uploadOptions, | 408 uploadMedia: _uploadMedia, |
| 424 uploadMedia: _uploadMedia, | 409 downloadOptions: _downloadOptions); |
| 425 downloadOptions: _downloadOptions); | |
| 426 return _response.then((data) => new SurveysListResponse.fromJson(data)); | 410 return _response.then((data) => new SurveysListResponse.fromJson(data)); |
| 427 } | 411 } |
| 428 | 412 |
| 429 /** | 413 /// Begins running a survey. |
| 430 * Begins running a survey. | 414 /// |
| 431 * | 415 /// [request] - The metadata request object. |
| 432 * [request] - The metadata request object. | 416 /// |
| 433 * | 417 /// Request parameters: |
| 434 * Request parameters: | 418 /// |
| 435 * | 419 /// [resourceId] - null |
| 436 * [resourceId] - null | 420 /// |
| 437 * | 421 /// Completes with a [SurveysStartResponse]. |
| 438 * Completes with a [SurveysStartResponse]. | 422 /// |
| 439 * | 423 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 440 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 424 /// an error. |
| 441 * error. | 425 /// |
| 442 * | 426 /// If the used [http.Client] completes with an error when making a REST |
| 443 * If the used [http.Client] completes with an error when making a REST call, | 427 /// call, this method will complete with the same error. |
| 444 * this method will complete with the same error. | 428 async.Future<SurveysStartResponse> start( |
| 445 */ | 429 SurveysStartRequest request, core.String resourceId) { |
| 446 async.Future<SurveysStartResponse> start(SurveysStartRequest request, core.Str
ing resourceId) { | |
| 447 var _url = null; | 430 var _url = null; |
| 448 var _queryParams = new core.Map(); | 431 var _queryParams = new core.Map(); |
| 449 var _uploadMedia = null; | 432 var _uploadMedia = null; |
| 450 var _uploadOptions = null; | 433 var _uploadOptions = null; |
| 451 var _downloadOptions = commons.DownloadOptions.Metadata; | 434 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 452 var _body = null; | 435 var _body = null; |
| 453 | 436 |
| 454 if (request != null) { | 437 if (request != null) { |
| 455 _body = convert.JSON.encode((request).toJson()); | 438 _body = convert.JSON.encode((request).toJson()); |
| 456 } | 439 } |
| 457 if (resourceId == null) { | 440 if (resourceId == null) { |
| 458 throw new core.ArgumentError("Parameter resourceId is required."); | 441 throw new core.ArgumentError("Parameter resourceId is required."); |
| 459 } | 442 } |
| 460 | 443 |
| 461 _url = 'surveys/' + commons.Escaper.ecapeVariable('$resourceId') + '/start'; | 444 _url = 'surveys/' + commons.Escaper.ecapeVariable('$resourceId') + '/start'; |
| 462 | 445 |
| 463 var _response = _requester.request(_url, | 446 var _response = _requester.request(_url, "POST", |
| 464 "POST", | 447 body: _body, |
| 465 body: _body, | 448 queryParams: _queryParams, |
| 466 queryParams: _queryParams, | 449 uploadOptions: _uploadOptions, |
| 467 uploadOptions: _uploadOptions, | 450 uploadMedia: _uploadMedia, |
| 468 uploadMedia: _uploadMedia, | 451 downloadOptions: _downloadOptions); |
| 469 downloadOptions: _downloadOptions); | |
| 470 return _response.then((data) => new SurveysStartResponse.fromJson(data)); | 452 return _response.then((data) => new SurveysStartResponse.fromJson(data)); |
| 471 } | 453 } |
| 472 | 454 |
| 473 /** | 455 /// Stops a running survey. |
| 474 * Stops a running survey. | 456 /// |
| 475 * | 457 /// Request parameters: |
| 476 * Request parameters: | 458 /// |
| 477 * | 459 /// [resourceId] - null |
| 478 * [resourceId] - null | 460 /// |
| 479 * | 461 /// Completes with a [SurveysStopResponse]. |
| 480 * Completes with a [SurveysStopResponse]. | 462 /// |
| 481 * | 463 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 482 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 464 /// an error. |
| 483 * error. | 465 /// |
| 484 * | 466 /// If the used [http.Client] completes with an error when making a REST |
| 485 * If the used [http.Client] completes with an error when making a REST call, | 467 /// call, this method will complete with the same error. |
| 486 * this method will complete with the same error. | |
| 487 */ | |
| 488 async.Future<SurveysStopResponse> stop(core.String resourceId) { | 468 async.Future<SurveysStopResponse> stop(core.String resourceId) { |
| 489 var _url = null; | 469 var _url = null; |
| 490 var _queryParams = new core.Map(); | 470 var _queryParams = new core.Map(); |
| 491 var _uploadMedia = null; | 471 var _uploadMedia = null; |
| 492 var _uploadOptions = null; | 472 var _uploadOptions = null; |
| 493 var _downloadOptions = commons.DownloadOptions.Metadata; | 473 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 494 var _body = null; | 474 var _body = null; |
| 495 | 475 |
| 496 if (resourceId == null) { | 476 if (resourceId == null) { |
| 497 throw new core.ArgumentError("Parameter resourceId is required."); | 477 throw new core.ArgumentError("Parameter resourceId is required."); |
| 498 } | 478 } |
| 499 | 479 |
| 500 _url = 'surveys/' + commons.Escaper.ecapeVariable('$resourceId') + '/stop'; | 480 _url = 'surveys/' + commons.Escaper.ecapeVariable('$resourceId') + '/stop'; |
| 501 | 481 |
| 502 var _response = _requester.request(_url, | 482 var _response = _requester.request(_url, "POST", |
| 503 "POST", | 483 body: _body, |
| 504 body: _body, | 484 queryParams: _queryParams, |
| 505 queryParams: _queryParams, | 485 uploadOptions: _uploadOptions, |
| 506 uploadOptions: _uploadOptions, | 486 uploadMedia: _uploadMedia, |
| 507 uploadMedia: _uploadMedia, | 487 downloadOptions: _downloadOptions); |
| 508 downloadOptions: _downloadOptions); | |
| 509 return _response.then((data) => new SurveysStopResponse.fromJson(data)); | 488 return _response.then((data) => new SurveysStopResponse.fromJson(data)); |
| 510 } | 489 } |
| 511 | 490 |
| 512 /** | 491 /// Updates a survey. Currently the only property that can be updated is the |
| 513 * Updates a survey. Currently the only property that can be updated is the | 492 /// owners property. |
| 514 * owners property. | 493 /// |
| 515 * | 494 /// [request] - The metadata request object. |
| 516 * [request] - The metadata request object. | 495 /// |
| 517 * | 496 /// Request parameters: |
| 518 * Request parameters: | 497 /// |
| 519 * | 498 /// [surveyUrlId] - External URL ID for the survey. |
| 520 * [surveyUrlId] - External URL ID for the survey. | 499 /// |
| 521 * | 500 /// Completes with a [Survey]. |
| 522 * Completes with a [Survey]. | 501 /// |
| 523 * | 502 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 524 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 503 /// an error. |
| 525 * error. | 504 /// |
| 526 * | 505 /// If the used [http.Client] completes with an error when making a REST |
| 527 * If the used [http.Client] completes with an error when making a REST call, | 506 /// call, this method will complete with the same error. |
| 528 * this method will complete with the same error. | |
| 529 */ | |
| 530 async.Future<Survey> update(Survey request, core.String surveyUrlId) { | 507 async.Future<Survey> update(Survey request, core.String surveyUrlId) { |
| 531 var _url = null; | 508 var _url = null; |
| 532 var _queryParams = new core.Map(); | 509 var _queryParams = new core.Map(); |
| 533 var _uploadMedia = null; | 510 var _uploadMedia = null; |
| 534 var _uploadOptions = null; | 511 var _uploadOptions = null; |
| 535 var _downloadOptions = commons.DownloadOptions.Metadata; | 512 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 536 var _body = null; | 513 var _body = null; |
| 537 | 514 |
| 538 if (request != null) { | 515 if (request != null) { |
| 539 _body = convert.JSON.encode((request).toJson()); | 516 _body = convert.JSON.encode((request).toJson()); |
| 540 } | 517 } |
| 541 if (surveyUrlId == null) { | 518 if (surveyUrlId == null) { |
| 542 throw new core.ArgumentError("Parameter surveyUrlId is required."); | 519 throw new core.ArgumentError("Parameter surveyUrlId is required."); |
| 543 } | 520 } |
| 544 | 521 |
| 545 _url = 'surveys/' + commons.Escaper.ecapeVariable('$surveyUrlId'); | 522 _url = 'surveys/' + commons.Escaper.ecapeVariable('$surveyUrlId'); |
| 546 | 523 |
| 547 var _response = _requester.request(_url, | 524 var _response = _requester.request(_url, "PUT", |
| 548 "PUT", | 525 body: _body, |
| 549 body: _body, | 526 queryParams: _queryParams, |
| 550 queryParams: _queryParams, | 527 uploadOptions: _uploadOptions, |
| 551 uploadOptions: _uploadOptions, | 528 uploadMedia: _uploadMedia, |
| 552 uploadMedia: _uploadMedia, | 529 downloadOptions: _downloadOptions); |
| 553 downloadOptions: _downloadOptions); | |
| 554 return _response.then((data) => new Survey.fromJson(data)); | 530 return _response.then((data) => new Survey.fromJson(data)); |
| 555 } | 531 } |
| 556 | |
| 557 } | 532 } |
| 558 | 533 |
| 559 | |
| 560 | |
| 561 class FieldMask { | 534 class FieldMask { |
| 562 core.List<FieldMask> fields; | 535 core.List<FieldMask> fields; |
| 563 core.int id; | 536 core.int id; |
| 564 | 537 |
| 565 FieldMask(); | 538 FieldMask(); |
| 566 | 539 |
| 567 FieldMask.fromJson(core.Map _json) { | 540 FieldMask.fromJson(core.Map _json) { |
| 568 if (_json.containsKey("fields")) { | 541 if (_json.containsKey("fields")) { |
| 569 fields = _json["fields"].map((value) => new FieldMask.fromJson(value)).toL
ist(); | 542 fields = _json["fields"] |
| 543 .map((value) => new FieldMask.fromJson(value)) |
| 544 .toList(); |
| 570 } | 545 } |
| 571 if (_json.containsKey("id")) { | 546 if (_json.containsKey("id")) { |
| 572 id = _json["id"]; | 547 id = _json["id"]; |
| 573 } | 548 } |
| 574 } | 549 } |
| 575 | 550 |
| 576 core.Map<core.String, core.Object> toJson() { | 551 core.Map<core.String, core.Object> toJson() { |
| 577 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 552 final core.Map<core.String, core.Object> _json = |
| 553 new core.Map<core.String, core.Object>(); |
| 578 if (fields != null) { | 554 if (fields != null) { |
| 579 _json["fields"] = fields.map((value) => (value).toJson()).toList(); | 555 _json["fields"] = fields.map((value) => (value).toJson()).toList(); |
| 580 } | 556 } |
| 581 if (id != null) { | 557 if (id != null) { |
| 582 _json["id"] = id; | 558 _json["id"] = id; |
| 583 } | 559 } |
| 584 return _json; | 560 return _json; |
| 585 } | 561 } |
| 586 } | 562 } |
| 587 | 563 |
| 588 /** | 564 /// Representation of an individual pre-defined panel object defining a |
| 589 * Representation of an individual pre-defined panel object defining a targeted | 565 /// targeted audience of opinion rewards mobile app users. |
| 590 * audience of opinion rewards mobile app users. | |
| 591 */ | |
| 592 class MobileAppPanel { | 566 class MobileAppPanel { |
| 593 /** | 567 /// Country code for the country of the users that the panel contains. Uses |
| 594 * Country code for the country of the users that the panel contains. Uses | 568 /// standard ISO 3166-1 2-character language codes. For instance, 'US' for |
| 595 * standard ISO 3166-1 2-character language codes. For instance, 'US' for the | 569 /// the United States, and 'GB' for the United Kingdom. Any survey created |
| 596 * United States, and 'GB' for the United Kingdom. Any survey created | 570 /// targeting this panel must also target the corresponding country. |
| 597 * targeting this panel must also target the corresponding country. | |
| 598 */ | |
| 599 core.String country; | 571 core.String country; |
| 600 /** Whether or not the panel is accessible to all API users. */ | 572 |
| 573 /// Whether or not the panel is accessible to all API users. |
| 601 core.bool isPublicPanel; | 574 core.bool isPublicPanel; |
| 602 /** | 575 |
| 603 * Language code that the panel can target. For instance, 'en-US'. Uses | 576 /// Language code that the panel can target. For instance, 'en-US'. Uses |
| 604 * standard BCP47 language codes. See specification. Any survey created | 577 /// standard BCP47 language codes. See specification. Any survey created |
| 605 * targeting this panel must also target the corresponding language. | 578 /// targeting this panel must also target the corresponding language. |
| 606 */ | |
| 607 core.String language; | 579 core.String language; |
| 608 /** | 580 |
| 609 * Unique panel ID string. This corresponds to the mobile_app_panel_id used in | 581 /// Unique panel ID string. This corresponds to the mobile_app_panel_id used |
| 610 * Survey Insert requests. | 582 /// in Survey Insert requests. |
| 611 */ | |
| 612 core.String mobileAppPanelId; | 583 core.String mobileAppPanelId; |
| 613 /** Human readable name of the audience panel. */ | 584 |
| 585 /// Human readable name of the audience panel. |
| 614 core.String name; | 586 core.String name; |
| 615 /** | 587 |
| 616 * List of email addresses for users who can target members of this panel. | 588 /// List of email addresses for users who can target members of this panel. |
| 617 * Must contain at least the address of the user making the API call for | 589 /// Must contain at least the address of the user making the API call for |
| 618 * panels that are not public. This field will be empty for public panels. | 590 /// panels that are not public. This field will be empty for public panels. |
| 619 */ | |
| 620 core.List<core.String> owners; | 591 core.List<core.String> owners; |
| 621 | 592 |
| 622 MobileAppPanel(); | 593 MobileAppPanel(); |
| 623 | 594 |
| 624 MobileAppPanel.fromJson(core.Map _json) { | 595 MobileAppPanel.fromJson(core.Map _json) { |
| 625 if (_json.containsKey("country")) { | 596 if (_json.containsKey("country")) { |
| 626 country = _json["country"]; | 597 country = _json["country"]; |
| 627 } | 598 } |
| 628 if (_json.containsKey("isPublicPanel")) { | 599 if (_json.containsKey("isPublicPanel")) { |
| 629 isPublicPanel = _json["isPublicPanel"]; | 600 isPublicPanel = _json["isPublicPanel"]; |
| 630 } | 601 } |
| 631 if (_json.containsKey("language")) { | 602 if (_json.containsKey("language")) { |
| 632 language = _json["language"]; | 603 language = _json["language"]; |
| 633 } | 604 } |
| 634 if (_json.containsKey("mobileAppPanelId")) { | 605 if (_json.containsKey("mobileAppPanelId")) { |
| 635 mobileAppPanelId = _json["mobileAppPanelId"]; | 606 mobileAppPanelId = _json["mobileAppPanelId"]; |
| 636 } | 607 } |
| 637 if (_json.containsKey("name")) { | 608 if (_json.containsKey("name")) { |
| 638 name = _json["name"]; | 609 name = _json["name"]; |
| 639 } | 610 } |
| 640 if (_json.containsKey("owners")) { | 611 if (_json.containsKey("owners")) { |
| 641 owners = _json["owners"]; | 612 owners = _json["owners"]; |
| 642 } | 613 } |
| 643 } | 614 } |
| 644 | 615 |
| 645 core.Map<core.String, core.Object> toJson() { | 616 core.Map<core.String, core.Object> toJson() { |
| 646 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 617 final core.Map<core.String, core.Object> _json = |
| 618 new core.Map<core.String, core.Object>(); |
| 647 if (country != null) { | 619 if (country != null) { |
| 648 _json["country"] = country; | 620 _json["country"] = country; |
| 649 } | 621 } |
| 650 if (isPublicPanel != null) { | 622 if (isPublicPanel != null) { |
| 651 _json["isPublicPanel"] = isPublicPanel; | 623 _json["isPublicPanel"] = isPublicPanel; |
| 652 } | 624 } |
| 653 if (language != null) { | 625 if (language != null) { |
| 654 _json["language"] = language; | 626 _json["language"] = language; |
| 655 } | 627 } |
| 656 if (mobileAppPanelId != null) { | 628 if (mobileAppPanelId != null) { |
| 657 _json["mobileAppPanelId"] = mobileAppPanelId; | 629 _json["mobileAppPanelId"] = mobileAppPanelId; |
| 658 } | 630 } |
| 659 if (name != null) { | 631 if (name != null) { |
| 660 _json["name"] = name; | 632 _json["name"] = name; |
| 661 } | 633 } |
| 662 if (owners != null) { | 634 if (owners != null) { |
| 663 _json["owners"] = owners; | 635 _json["owners"] = owners; |
| 664 } | 636 } |
| 665 return _json; | 637 return _json; |
| 666 } | 638 } |
| 667 } | 639 } |
| 668 | 640 |
| 669 class MobileAppPanelsListResponse { | 641 class MobileAppPanelsListResponse { |
| 670 PageInfo pageInfo; | 642 PageInfo pageInfo; |
| 671 /** | 643 |
| 672 * Unique request ID used for logging and debugging. Please include in any | 644 /// Unique request ID used for logging and debugging. Please include in any |
| 673 * error reporting or troubleshooting requests. | 645 /// error reporting or troubleshooting requests. |
| 674 */ | |
| 675 core.String requestId; | 646 core.String requestId; |
| 676 /** An individual predefined panel of Opinion Rewards mobile users. */ | 647 |
| 648 /// An individual predefined panel of Opinion Rewards mobile users. |
| 677 core.List<MobileAppPanel> resources; | 649 core.List<MobileAppPanel> resources; |
| 678 TokenPagination tokenPagination; | 650 TokenPagination tokenPagination; |
| 679 | 651 |
| 680 MobileAppPanelsListResponse(); | 652 MobileAppPanelsListResponse(); |
| 681 | 653 |
| 682 MobileAppPanelsListResponse.fromJson(core.Map _json) { | 654 MobileAppPanelsListResponse.fromJson(core.Map _json) { |
| 683 if (_json.containsKey("pageInfo")) { | 655 if (_json.containsKey("pageInfo")) { |
| 684 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); | 656 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 685 } | 657 } |
| 686 if (_json.containsKey("requestId")) { | 658 if (_json.containsKey("requestId")) { |
| 687 requestId = _json["requestId"]; | 659 requestId = _json["requestId"]; |
| 688 } | 660 } |
| 689 if (_json.containsKey("resources")) { | 661 if (_json.containsKey("resources")) { |
| 690 resources = _json["resources"].map((value) => new MobileAppPanel.fromJson(
value)).toList(); | 662 resources = _json["resources"] |
| 663 .map((value) => new MobileAppPanel.fromJson(value)) |
| 664 .toList(); |
| 691 } | 665 } |
| 692 if (_json.containsKey("tokenPagination")) { | 666 if (_json.containsKey("tokenPagination")) { |
| 693 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); | 667 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 694 } | 668 } |
| 695 } | 669 } |
| 696 | 670 |
| 697 core.Map<core.String, core.Object> toJson() { | 671 core.Map<core.String, core.Object> toJson() { |
| 698 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 672 final core.Map<core.String, core.Object> _json = |
| 673 new core.Map<core.String, core.Object>(); |
| 699 if (pageInfo != null) { | 674 if (pageInfo != null) { |
| 700 _json["pageInfo"] = (pageInfo).toJson(); | 675 _json["pageInfo"] = (pageInfo).toJson(); |
| 701 } | 676 } |
| 702 if (requestId != null) { | 677 if (requestId != null) { |
| 703 _json["requestId"] = requestId; | 678 _json["requestId"] = requestId; |
| 704 } | 679 } |
| 705 if (resources != null) { | 680 if (resources != null) { |
| 706 _json["resources"] = resources.map((value) => (value).toJson()).toList(); | 681 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 707 } | 682 } |
| 708 if (tokenPagination != null) { | 683 if (tokenPagination != null) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 725 } | 700 } |
| 726 if (_json.containsKey("startIndex")) { | 701 if (_json.containsKey("startIndex")) { |
| 727 startIndex = _json["startIndex"]; | 702 startIndex = _json["startIndex"]; |
| 728 } | 703 } |
| 729 if (_json.containsKey("totalResults")) { | 704 if (_json.containsKey("totalResults")) { |
| 730 totalResults = _json["totalResults"]; | 705 totalResults = _json["totalResults"]; |
| 731 } | 706 } |
| 732 } | 707 } |
| 733 | 708 |
| 734 core.Map<core.String, core.Object> toJson() { | 709 core.Map<core.String, core.Object> toJson() { |
| 735 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 710 final core.Map<core.String, core.Object> _json = |
| 711 new core.Map<core.String, core.Object>(); |
| 736 if (resultPerPage != null) { | 712 if (resultPerPage != null) { |
| 737 _json["resultPerPage"] = resultPerPage; | 713 _json["resultPerPage"] = resultPerPage; |
| 738 } | 714 } |
| 739 if (startIndex != null) { | 715 if (startIndex != null) { |
| 740 _json["startIndex"] = startIndex; | 716 _json["startIndex"] = startIndex; |
| 741 } | 717 } |
| 742 if (totalResults != null) { | 718 if (totalResults != null) { |
| 743 _json["totalResults"] = totalResults; | 719 _json["totalResults"] = totalResults; |
| 744 } | 720 } |
| 745 return _json; | 721 return _json; |
| 746 } | 722 } |
| 747 } | 723 } |
| 748 | 724 |
| 749 class ResultsGetRequest { | 725 class ResultsGetRequest { |
| 750 ResultsMask resultMask; | 726 ResultsMask resultMask; |
| 751 | 727 |
| 752 ResultsGetRequest(); | 728 ResultsGetRequest(); |
| 753 | 729 |
| 754 ResultsGetRequest.fromJson(core.Map _json) { | 730 ResultsGetRequest.fromJson(core.Map _json) { |
| 755 if (_json.containsKey("resultMask")) { | 731 if (_json.containsKey("resultMask")) { |
| 756 resultMask = new ResultsMask.fromJson(_json["resultMask"]); | 732 resultMask = new ResultsMask.fromJson(_json["resultMask"]); |
| 757 } | 733 } |
| 758 } | 734 } |
| 759 | 735 |
| 760 core.Map<core.String, core.Object> toJson() { | 736 core.Map<core.String, core.Object> toJson() { |
| 761 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 737 final core.Map<core.String, core.Object> _json = |
| 738 new core.Map<core.String, core.Object>(); |
| 762 if (resultMask != null) { | 739 if (resultMask != null) { |
| 763 _json["resultMask"] = (resultMask).toJson(); | 740 _json["resultMask"] = (resultMask).toJson(); |
| 764 } | 741 } |
| 765 return _json; | 742 return _json; |
| 766 } | 743 } |
| 767 } | 744 } |
| 768 | 745 |
| 769 class ResultsMask { | 746 class ResultsMask { |
| 770 core.List<FieldMask> fields; | 747 core.List<FieldMask> fields; |
| 771 core.String projection; | 748 core.String projection; |
| 772 | 749 |
| 773 ResultsMask(); | 750 ResultsMask(); |
| 774 | 751 |
| 775 ResultsMask.fromJson(core.Map _json) { | 752 ResultsMask.fromJson(core.Map _json) { |
| 776 if (_json.containsKey("fields")) { | 753 if (_json.containsKey("fields")) { |
| 777 fields = _json["fields"].map((value) => new FieldMask.fromJson(value)).toL
ist(); | 754 fields = _json["fields"] |
| 755 .map((value) => new FieldMask.fromJson(value)) |
| 756 .toList(); |
| 778 } | 757 } |
| 779 if (_json.containsKey("projection")) { | 758 if (_json.containsKey("projection")) { |
| 780 projection = _json["projection"]; | 759 projection = _json["projection"]; |
| 781 } | 760 } |
| 782 } | 761 } |
| 783 | 762 |
| 784 core.Map<core.String, core.Object> toJson() { | 763 core.Map<core.String, core.Object> toJson() { |
| 785 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 764 final core.Map<core.String, core.Object> _json = |
| 765 new core.Map<core.String, core.Object>(); |
| 786 if (fields != null) { | 766 if (fields != null) { |
| 787 _json["fields"] = fields.map((value) => (value).toJson()).toList(); | 767 _json["fields"] = fields.map((value) => (value).toJson()).toList(); |
| 788 } | 768 } |
| 789 if (projection != null) { | 769 if (projection != null) { |
| 790 _json["projection"] = projection; | 770 _json["projection"] = projection; |
| 791 } | 771 } |
| 792 return _json; | 772 return _json; |
| 793 } | 773 } |
| 794 } | 774 } |
| 795 | 775 |
| 796 /** Representation of an individual survey object. */ | 776 /// Representation of an individual survey object. |
| 797 class Survey { | 777 class Survey { |
| 798 /** Targeting-criteria message containing demographic information */ | 778 /// Targeting-criteria message containing demographic information |
| 799 SurveyAudience audience; | 779 SurveyAudience audience; |
| 800 /** Cost to run the survey and collect the necessary number of responses. */ | 780 |
| 781 /// Cost to run the survey and collect the necessary number of responses. |
| 801 SurveyCost cost; | 782 SurveyCost cost; |
| 802 /** | 783 |
| 803 * Additional information to store on behalf of the API consumer and associate | 784 /// Additional information to store on behalf of the API consumer and |
| 804 * with this question. This binary blob is treated as opaque. This field is | 785 /// associate with this question. This binary blob is treated as opaque. This |
| 805 * limited to 64K bytes. | 786 /// field is limited to 64K bytes. |
| 806 */ | |
| 807 core.String customerData; | 787 core.String customerData; |
| 808 core.List<core.int> get customerDataAsBytes { | 788 core.List<core.int> get customerDataAsBytes { |
| 809 return convert.BASE64.decode(customerData); | 789 return convert.BASE64.decode(customerData); |
| 810 } | 790 } |
| 811 | 791 |
| 812 void set customerDataAsBytes(core.List<core.int> _bytes) { | 792 void set customerDataAsBytes(core.List<core.int> _bytes) { |
| 813 customerData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll
("+", "-"); | 793 customerData = |
| 794 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
| 814 } | 795 } |
| 815 /** Text description of the survey. */ | 796 |
| 797 /// Text description of the survey. |
| 816 core.String description; | 798 core.String description; |
| 817 /** | 799 |
| 818 * List of email addresses for survey owners. Must contain at least the | 800 /// List of email addresses for survey owners. Must contain at least the |
| 819 * address of the user making the API call. | 801 /// address of the user making the API call. |
| 820 */ | |
| 821 core.List<core.String> owners; | 802 core.List<core.String> owners; |
| 822 /** List of questions defining the survey. */ | 803 |
| 804 /// List of questions defining the survey. |
| 823 core.List<SurveyQuestion> questions; | 805 core.List<SurveyQuestion> questions; |
| 824 /** | 806 |
| 825 * Reason for the survey being rejected. Only present if the survey state is | 807 /// Reason for the survey being rejected. Only present if the survey state is |
| 826 * rejected. | 808 /// rejected. |
| 827 */ | |
| 828 SurveyRejection rejectionReason; | 809 SurveyRejection rejectionReason; |
| 829 /** State that the survey is in. */ | 810 |
| 811 /// State that the survey is in. |
| 830 core.String state; | 812 core.String state; |
| 831 /** Unique survey ID, that is viewable in the URL of the Survey Creator UI */ | 813 |
| 814 /// Unique survey ID, that is viewable in the URL of the Survey Creator UI |
| 832 core.String surveyUrlId; | 815 core.String surveyUrlId; |
| 833 /** Optional name that will be given to the survey. */ | 816 |
| 817 /// Optional name that will be given to the survey. |
| 834 core.String title; | 818 core.String title; |
| 835 /** Number of responses desired for the survey. */ | 819 |
| 820 /// Number of responses desired for the survey. |
| 836 core.int wantedResponseCount; | 821 core.int wantedResponseCount; |
| 837 | 822 |
| 838 Survey(); | 823 Survey(); |
| 839 | 824 |
| 840 Survey.fromJson(core.Map _json) { | 825 Survey.fromJson(core.Map _json) { |
| 841 if (_json.containsKey("audience")) { | 826 if (_json.containsKey("audience")) { |
| 842 audience = new SurveyAudience.fromJson(_json["audience"]); | 827 audience = new SurveyAudience.fromJson(_json["audience"]); |
| 843 } | 828 } |
| 844 if (_json.containsKey("cost")) { | 829 if (_json.containsKey("cost")) { |
| 845 cost = new SurveyCost.fromJson(_json["cost"]); | 830 cost = new SurveyCost.fromJson(_json["cost"]); |
| 846 } | 831 } |
| 847 if (_json.containsKey("customerData")) { | 832 if (_json.containsKey("customerData")) { |
| 848 customerData = _json["customerData"]; | 833 customerData = _json["customerData"]; |
| 849 } | 834 } |
| 850 if (_json.containsKey("description")) { | 835 if (_json.containsKey("description")) { |
| 851 description = _json["description"]; | 836 description = _json["description"]; |
| 852 } | 837 } |
| 853 if (_json.containsKey("owners")) { | 838 if (_json.containsKey("owners")) { |
| 854 owners = _json["owners"]; | 839 owners = _json["owners"]; |
| 855 } | 840 } |
| 856 if (_json.containsKey("questions")) { | 841 if (_json.containsKey("questions")) { |
| 857 questions = _json["questions"].map((value) => new SurveyQuestion.fromJson(
value)).toList(); | 842 questions = _json["questions"] |
| 843 .map((value) => new SurveyQuestion.fromJson(value)) |
| 844 .toList(); |
| 858 } | 845 } |
| 859 if (_json.containsKey("rejectionReason")) { | 846 if (_json.containsKey("rejectionReason")) { |
| 860 rejectionReason = new SurveyRejection.fromJson(_json["rejectionReason"]); | 847 rejectionReason = new SurveyRejection.fromJson(_json["rejectionReason"]); |
| 861 } | 848 } |
| 862 if (_json.containsKey("state")) { | 849 if (_json.containsKey("state")) { |
| 863 state = _json["state"]; | 850 state = _json["state"]; |
| 864 } | 851 } |
| 865 if (_json.containsKey("surveyUrlId")) { | 852 if (_json.containsKey("surveyUrlId")) { |
| 866 surveyUrlId = _json["surveyUrlId"]; | 853 surveyUrlId = _json["surveyUrlId"]; |
| 867 } | 854 } |
| 868 if (_json.containsKey("title")) { | 855 if (_json.containsKey("title")) { |
| 869 title = _json["title"]; | 856 title = _json["title"]; |
| 870 } | 857 } |
| 871 if (_json.containsKey("wantedResponseCount")) { | 858 if (_json.containsKey("wantedResponseCount")) { |
| 872 wantedResponseCount = _json["wantedResponseCount"]; | 859 wantedResponseCount = _json["wantedResponseCount"]; |
| 873 } | 860 } |
| 874 } | 861 } |
| 875 | 862 |
| 876 core.Map<core.String, core.Object> toJson() { | 863 core.Map<core.String, core.Object> toJson() { |
| 877 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 864 final core.Map<core.String, core.Object> _json = |
| 865 new core.Map<core.String, core.Object>(); |
| 878 if (audience != null) { | 866 if (audience != null) { |
| 879 _json["audience"] = (audience).toJson(); | 867 _json["audience"] = (audience).toJson(); |
| 880 } | 868 } |
| 881 if (cost != null) { | 869 if (cost != null) { |
| 882 _json["cost"] = (cost).toJson(); | 870 _json["cost"] = (cost).toJson(); |
| 883 } | 871 } |
| 884 if (customerData != null) { | 872 if (customerData != null) { |
| 885 _json["customerData"] = customerData; | 873 _json["customerData"] = customerData; |
| 886 } | 874 } |
| 887 if (description != null) { | 875 if (description != null) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 905 if (title != null) { | 893 if (title != null) { |
| 906 _json["title"] = title; | 894 _json["title"] = title; |
| 907 } | 895 } |
| 908 if (wantedResponseCount != null) { | 896 if (wantedResponseCount != null) { |
| 909 _json["wantedResponseCount"] = wantedResponseCount; | 897 _json["wantedResponseCount"] = wantedResponseCount; |
| 910 } | 898 } |
| 911 return _json; | 899 return _json; |
| 912 } | 900 } |
| 913 } | 901 } |
| 914 | 902 |
| 915 /** Specifications for the target audience of a survey run through the API. */ | 903 /// Specifications for the target audience of a survey run through the API. |
| 916 class SurveyAudience { | 904 class SurveyAudience { |
| 917 /** | 905 /// Optional list of age buckets to target. Supported age buckets are: |
| 918 * Optional list of age buckets to target. Supported age buckets are: | 906 /// ['18-24', '25-34', '35-44', '45-54', '55-64', '65+'] |
| 919 * ['18-24', '25-34', '35-44', '45-54', '55-64', '65+'] | |
| 920 */ | |
| 921 core.List<core.String> ages; | 907 core.List<core.String> ages; |
| 922 /** | 908 |
| 923 * Required country code that surveys should be targeted to. Accepts standard | 909 /// Required country code that surveys should be targeted to. Accepts |
| 924 * ISO 3166-1 2 character language codes. For instance, 'US' for the United | 910 /// standard ISO 3166-1 2 character language codes. For instance, 'US' for |
| 925 * States, and 'GB' for the United Kingdom. | 911 /// the United States, and 'GB' for the United Kingdom. |
| 926 */ | |
| 927 core.String country; | 912 core.String country; |
| 928 /** | 913 |
| 929 * Country subdivision (states/provinces/etc) that surveys should be targeted | 914 /// Country subdivision (states/provinces/etc) that surveys should be |
| 930 * to. For all countries except GB, ISO-3166-2 subdivision code is required | 915 /// targeted to. For all countries except GB, ISO-3166-2 subdivision code is |
| 931 * (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region | 916 /// required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 |
| 932 * codes for the United Kingdom is required (eg. 'UK-UKC' for North East | 917 /// statistical region codes for the United Kingdom is required (eg. 'UK-UKC' |
| 933 * England). | 918 /// for North East England). |
| 934 */ | |
| 935 core.String countrySubdivision; | 919 core.String countrySubdivision; |
| 936 /** Optional gender to target. */ | 920 |
| 921 /// Optional gender to target. |
| 937 core.String gender; | 922 core.String gender; |
| 938 /** | 923 |
| 939 * Language code that surveys should be targeted to. For instance, 'en-US'. | 924 /// Language code that surveys should be targeted to. For instance, 'en-US'. |
| 940 * Surveys may target bilingual users by specifying a list of language codes | 925 /// Surveys may target bilingual users by specifying a list of language codes |
| 941 * (for example, 'de' and 'en-US'). In that case, all languages will be used | 926 /// (for example, 'de' and 'en-US'). In that case, all languages will be used |
| 942 * for targeting users but the survey content (which is displayed) must match | 927 /// for targeting users but the survey content (which is displayed) must |
| 943 * the first language listed. Accepts standard BCP47 language codes. See | 928 /// match the first language listed. Accepts standard BCP47 language codes. |
| 944 * specification. | 929 /// See specification. |
| 945 */ | |
| 946 core.List<core.String> languages; | 930 core.List<core.String> languages; |
| 947 /** | 931 |
| 948 * Key for predefined panel that causes survey to be sent to a predefined set | 932 /// Key for predefined panel that causes survey to be sent to a predefined |
| 949 * of Opinion Rewards App users. You must set PopulationSource to | 933 /// set of Opinion Rewards App users. You must set PopulationSource to |
| 950 * ANDROID_APP_PANEL to use this field. | 934 /// ANDROID_APP_PANEL to use this field. |
| 951 */ | |
| 952 core.String mobileAppPanelId; | 935 core.String mobileAppPanelId; |
| 953 /** Online population source where the respondents are sampled from. */ | 936 |
| 937 /// Online population source where the respondents are sampled from. |
| 954 core.String populationSource; | 938 core.String populationSource; |
| 955 | 939 |
| 956 SurveyAudience(); | 940 SurveyAudience(); |
| 957 | 941 |
| 958 SurveyAudience.fromJson(core.Map _json) { | 942 SurveyAudience.fromJson(core.Map _json) { |
| 959 if (_json.containsKey("ages")) { | 943 if (_json.containsKey("ages")) { |
| 960 ages = _json["ages"]; | 944 ages = _json["ages"]; |
| 961 } | 945 } |
| 962 if (_json.containsKey("country")) { | 946 if (_json.containsKey("country")) { |
| 963 country = _json["country"]; | 947 country = _json["country"]; |
| 964 } | 948 } |
| 965 if (_json.containsKey("countrySubdivision")) { | 949 if (_json.containsKey("countrySubdivision")) { |
| 966 countrySubdivision = _json["countrySubdivision"]; | 950 countrySubdivision = _json["countrySubdivision"]; |
| 967 } | 951 } |
| 968 if (_json.containsKey("gender")) { | 952 if (_json.containsKey("gender")) { |
| 969 gender = _json["gender"]; | 953 gender = _json["gender"]; |
| 970 } | 954 } |
| 971 if (_json.containsKey("languages")) { | 955 if (_json.containsKey("languages")) { |
| 972 languages = _json["languages"]; | 956 languages = _json["languages"]; |
| 973 } | 957 } |
| 974 if (_json.containsKey("mobileAppPanelId")) { | 958 if (_json.containsKey("mobileAppPanelId")) { |
| 975 mobileAppPanelId = _json["mobileAppPanelId"]; | 959 mobileAppPanelId = _json["mobileAppPanelId"]; |
| 976 } | 960 } |
| 977 if (_json.containsKey("populationSource")) { | 961 if (_json.containsKey("populationSource")) { |
| 978 populationSource = _json["populationSource"]; | 962 populationSource = _json["populationSource"]; |
| 979 } | 963 } |
| 980 } | 964 } |
| 981 | 965 |
| 982 core.Map<core.String, core.Object> toJson() { | 966 core.Map<core.String, core.Object> toJson() { |
| 983 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 967 final core.Map<core.String, core.Object> _json = |
| 968 new core.Map<core.String, core.Object>(); |
| 984 if (ages != null) { | 969 if (ages != null) { |
| 985 _json["ages"] = ages; | 970 _json["ages"] = ages; |
| 986 } | 971 } |
| 987 if (country != null) { | 972 if (country != null) { |
| 988 _json["country"] = country; | 973 _json["country"] = country; |
| 989 } | 974 } |
| 990 if (countrySubdivision != null) { | 975 if (countrySubdivision != null) { |
| 991 _json["countrySubdivision"] = countrySubdivision; | 976 _json["countrySubdivision"] = countrySubdivision; |
| 992 } | 977 } |
| 993 if (gender != null) { | 978 if (gender != null) { |
| 994 _json["gender"] = gender; | 979 _json["gender"] = gender; |
| 995 } | 980 } |
| 996 if (languages != null) { | 981 if (languages != null) { |
| 997 _json["languages"] = languages; | 982 _json["languages"] = languages; |
| 998 } | 983 } |
| 999 if (mobileAppPanelId != null) { | 984 if (mobileAppPanelId != null) { |
| 1000 _json["mobileAppPanelId"] = mobileAppPanelId; | 985 _json["mobileAppPanelId"] = mobileAppPanelId; |
| 1001 } | 986 } |
| 1002 if (populationSource != null) { | 987 if (populationSource != null) { |
| 1003 _json["populationSource"] = populationSource; | 988 _json["populationSource"] = populationSource; |
| 1004 } | 989 } |
| 1005 return _json; | 990 return _json; |
| 1006 } | 991 } |
| 1007 } | 992 } |
| 1008 | 993 |
| 1009 /** Message defining the cost to run a given survey through API. */ | 994 /// Message defining the cost to run a given survey through API. |
| 1010 class SurveyCost { | 995 class SurveyCost { |
| 1011 /** | 996 /// Cost per survey response in nano units of the given currency. To get the |
| 1012 * Cost per survey response in nano units of the given currency. To get the | 997 /// total cost for a survey, multiply this value by wanted_response_count. |
| 1013 * total cost for a survey, multiply this value by wanted_response_count. | |
| 1014 */ | |
| 1015 core.String costPerResponseNanos; | 998 core.String costPerResponseNanos; |
| 1016 /** Currency code that the cost is given in. */ | 999 |
| 1000 /// Currency code that the cost is given in. |
| 1017 core.String currencyCode; | 1001 core.String currencyCode; |
| 1018 /** | 1002 |
| 1019 * Threshold to start a survey automatically if the quoted price is at most | 1003 /// Threshold to start a survey automatically if the quoted price is at most |
| 1020 * this value. When a survey has a Screener (threshold) question, it must go | 1004 /// this value. When a survey has a Screener (threshold) question, it must go |
| 1021 * through an incidence pricing test to determine the final cost per response. | 1005 /// through an incidence pricing test to determine the final cost per |
| 1022 * Typically you will have to make a followup call to start the survey giving | 1006 /// response. Typically you will have to make a followup call to start the |
| 1023 * the final computed cost per response. If the survey has no | 1007 /// survey giving the final computed cost per response. If the survey has no |
| 1024 * threshold_answers, setting this property will return an error. By | 1008 /// threshold_answers, setting this property will return an error. By |
| 1025 * specifying this property, you indicate the max price per response you are | 1009 /// specifying this property, you indicate the max price per response you are |
| 1026 * willing to pay in advance of the incidence test. If the price turns out to | 1010 /// willing to pay in advance of the incidence test. If the price turns out |
| 1027 * be lower than the specified value, the survey will begin immediately and | 1011 /// to be lower than the specified value, the survey will begin immediately |
| 1028 * you will be charged at the rate determined by the incidence pricing test. | 1012 /// and you will be charged at the rate determined by the incidence pricing |
| 1029 * If the price turns out to be greater than the specified value the survey | 1013 /// test. If the price turns out to be greater than the specified value the |
| 1030 * will not be started and you will instead be notified what price was | 1014 /// survey will not be started and you will instead be notified what price |
| 1031 * determined by the incidence test. At that point, you must raise the value | 1015 /// was determined by the incidence test. At that point, you must raise the |
| 1032 * of this property to be greater than or equal to that cost before attempting | 1016 /// value of this property to be greater than or equal to that cost before |
| 1033 * to start the survey again. This will immediately start the survey as long | 1017 /// attempting to start the survey again. This will immediately start the |
| 1034 * the incidence test was run within the last 21 days. | 1018 /// survey as long the incidence test was run within the last 21 days. |
| 1035 */ | |
| 1036 core.String maxCostPerResponseNanos; | 1019 core.String maxCostPerResponseNanos; |
| 1037 /** | 1020 |
| 1038 * Cost of survey in nano units of the given currency. DEPRECATED in favor of | 1021 /// Cost of survey in nano units of the given currency. DEPRECATED in favor |
| 1039 * cost_per_response_nanos | 1022 /// of cost_per_response_nanos |
| 1040 */ | |
| 1041 core.String nanos; | 1023 core.String nanos; |
| 1042 | 1024 |
| 1043 SurveyCost(); | 1025 SurveyCost(); |
| 1044 | 1026 |
| 1045 SurveyCost.fromJson(core.Map _json) { | 1027 SurveyCost.fromJson(core.Map _json) { |
| 1046 if (_json.containsKey("costPerResponseNanos")) { | 1028 if (_json.containsKey("costPerResponseNanos")) { |
| 1047 costPerResponseNanos = _json["costPerResponseNanos"]; | 1029 costPerResponseNanos = _json["costPerResponseNanos"]; |
| 1048 } | 1030 } |
| 1049 if (_json.containsKey("currencyCode")) { | 1031 if (_json.containsKey("currencyCode")) { |
| 1050 currencyCode = _json["currencyCode"]; | 1032 currencyCode = _json["currencyCode"]; |
| 1051 } | 1033 } |
| 1052 if (_json.containsKey("maxCostPerResponseNanos")) { | 1034 if (_json.containsKey("maxCostPerResponseNanos")) { |
| 1053 maxCostPerResponseNanos = _json["maxCostPerResponseNanos"]; | 1035 maxCostPerResponseNanos = _json["maxCostPerResponseNanos"]; |
| 1054 } | 1036 } |
| 1055 if (_json.containsKey("nanos")) { | 1037 if (_json.containsKey("nanos")) { |
| 1056 nanos = _json["nanos"]; | 1038 nanos = _json["nanos"]; |
| 1057 } | 1039 } |
| 1058 } | 1040 } |
| 1059 | 1041 |
| 1060 core.Map<core.String, core.Object> toJson() { | 1042 core.Map<core.String, core.Object> toJson() { |
| 1061 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1043 final core.Map<core.String, core.Object> _json = |
| 1044 new core.Map<core.String, core.Object>(); |
| 1062 if (costPerResponseNanos != null) { | 1045 if (costPerResponseNanos != null) { |
| 1063 _json["costPerResponseNanos"] = costPerResponseNanos; | 1046 _json["costPerResponseNanos"] = costPerResponseNanos; |
| 1064 } | 1047 } |
| 1065 if (currencyCode != null) { | 1048 if (currencyCode != null) { |
| 1066 _json["currencyCode"] = currencyCode; | 1049 _json["currencyCode"] = currencyCode; |
| 1067 } | 1050 } |
| 1068 if (maxCostPerResponseNanos != null) { | 1051 if (maxCostPerResponseNanos != null) { |
| 1069 _json["maxCostPerResponseNanos"] = maxCostPerResponseNanos; | 1052 _json["maxCostPerResponseNanos"] = maxCostPerResponseNanos; |
| 1070 } | 1053 } |
| 1071 if (nanos != null) { | 1054 if (nanos != null) { |
| 1072 _json["nanos"] = nanos; | 1055 _json["nanos"] = nanos; |
| 1073 } | 1056 } |
| 1074 return _json; | 1057 return _json; |
| 1075 } | 1058 } |
| 1076 } | 1059 } |
| 1077 | 1060 |
| 1078 /** Message defining the question specifications. */ | 1061 /// Message defining the question specifications. |
| 1079 class SurveyQuestion { | 1062 class SurveyQuestion { |
| 1080 /** | 1063 /// The randomization option for multiple choice and multi-select questions. |
| 1081 * The randomization option for multiple choice and multi-select questions. If | 1064 /// If not specified, this option defaults to randomize. |
| 1082 * not specified, this option defaults to randomize. | |
| 1083 */ | |
| 1084 core.String answerOrder; | 1065 core.String answerOrder; |
| 1085 /** Required list of answer options for a question. */ | 1066 |
| 1067 /// Required list of answer options for a question. |
| 1086 core.List<core.String> answers; | 1068 core.List<core.String> answers; |
| 1087 /** | 1069 |
| 1088 * Option to allow open-ended text box for Single Answer and Multiple Answer | 1070 /// Option to allow open-ended text box for Single Answer and Multiple Answer |
| 1089 * question types. This can be used with SINGLE_ANSWER, | 1071 /// question types. This can be used with SINGLE_ANSWER, |
| 1090 * SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE | 1072 /// SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and |
| 1091 * question types. | 1073 /// MULTIPLE_ANSWERS_WITH_IMAGE question types. |
| 1092 */ | |
| 1093 core.bool hasOther; | 1074 core.bool hasOther; |
| 1094 /** | 1075 |
| 1095 * For rating questions, the text for the higher end of the scale, such as | 1076 /// For rating questions, the text for the higher end of the scale, such as |
| 1096 * 'Best'. For numeric questions, a string representing a floating-point that | 1077 /// 'Best'. For numeric questions, a string representing a floating-point |
| 1097 * is the maximum allowed number for a response. | 1078 /// that is the maximum allowed number for a response. |
| 1098 */ | |
| 1099 core.String highValueLabel; | 1079 core.String highValueLabel; |
| 1100 core.List<SurveyQuestionImage> images; | 1080 core.List<SurveyQuestionImage> images; |
| 1101 /** Currently only support pinning an answer option to the last position. */ | 1081 |
| 1082 /// Currently only support pinning an answer option to the last position. |
| 1102 core.bool lastAnswerPositionPinned; | 1083 core.bool lastAnswerPositionPinned; |
| 1103 /** | 1084 |
| 1104 * For rating questions, the text for the lower end of the scale, such as | 1085 /// For rating questions, the text for the lower end of the scale, such as |
| 1105 * 'Worst'. For numeric questions, a string representing a floating-point that | 1086 /// 'Worst'. For numeric questions, a string representing a floating-point |
| 1106 * is the minimum allowed number for a response. | 1087 /// that is the minimum allowed number for a response. |
| 1107 */ | |
| 1108 core.String lowValueLabel; | 1088 core.String lowValueLabel; |
| 1109 /** | 1089 |
| 1110 * Option to force the user to pick one of the open text suggestions. This | 1090 /// Option to force the user to pick one of the open text suggestions. This |
| 1111 * requires that suggestions are provided for this question. | 1091 /// requires that suggestions are provided for this question. |
| 1112 */ | |
| 1113 core.bool mustPickSuggestion; | 1092 core.bool mustPickSuggestion; |
| 1114 /** Number of stars to use for ratings questions. */ | 1093 |
| 1094 /// Number of stars to use for ratings questions. |
| 1115 core.String numStars; | 1095 core.String numStars; |
| 1116 /** Placeholder text for an open text question. */ | 1096 |
| 1097 /// Placeholder text for an open text question. |
| 1117 core.String openTextPlaceholder; | 1098 core.String openTextPlaceholder; |
| 1118 /** | 1099 |
| 1119 * A list of suggested answers for open text question auto-complete. This is | 1100 /// A list of suggested answers for open text question auto-complete. This is |
| 1120 * only valid if single_line_response is true. | 1101 /// only valid if single_line_response is true. |
| 1121 */ | |
| 1122 core.List<core.String> openTextSuggestions; | 1102 core.List<core.String> openTextSuggestions; |
| 1123 /** Required question text shown to the respondent. */ | 1103 |
| 1104 /// Required question text shown to the respondent. |
| 1124 core.String question; | 1105 core.String question; |
| 1125 /** | 1106 |
| 1126 * Used by the Rating Scale with Text question type. This text goes along with | 1107 /// Used by the Rating Scale with Text question type. This text goes along |
| 1127 * the question field that is presented to the respondent, and is the actual | 1108 /// with the question field that is presented to the respondent, and is the |
| 1128 * text that the respondent is asked to rate. | 1109 /// actual text that the respondent is asked to rate. |
| 1129 */ | |
| 1130 core.String sentimentText; | 1110 core.String sentimentText; |
| 1131 /** | 1111 |
| 1132 * Option to allow multiple line open text responses instead of a single line | 1112 /// Option to allow multiple line open text responses instead of a single |
| 1133 * response. Note that we don't show auto-complete suggestions with multiple | 1113 /// line response. Note that we don't show auto-complete suggestions with |
| 1134 * line responses. | 1114 /// multiple line responses. |
| 1135 */ | |
| 1136 core.bool singleLineResponse; | 1115 core.bool singleLineResponse; |
| 1137 /** | 1116 |
| 1138 * The threshold/screener answer options, which will screen a user into the | 1117 /// The threshold/screener answer options, which will screen a user into the |
| 1139 * rest of the survey. These will be a subset of the answer option strings. | 1118 /// rest of the survey. These will be a subset of the answer option strings. |
| 1140 */ | |
| 1141 core.List<core.String> thresholdAnswers; | 1119 core.List<core.String> thresholdAnswers; |
| 1142 /** | 1120 |
| 1143 * Required field defining the question type. For details about configuring | 1121 /// Required field defining the question type. For details about configuring |
| 1144 * different type of questions, consult the question configuration guide. | 1122 /// different type of questions, consult the question configuration guide. |
| 1145 */ | |
| 1146 core.String type; | 1123 core.String type; |
| 1147 /** | 1124 |
| 1148 * Optional unit of measurement for display (for example: hours, people, | 1125 /// Optional unit of measurement for display (for example: hours, people, |
| 1149 * miles). | 1126 /// miles). |
| 1150 */ | |
| 1151 core.String unitOfMeasurementLabel; | 1127 core.String unitOfMeasurementLabel; |
| 1152 /** The YouTube video ID to be show in video questions. */ | 1128 |
| 1129 /// The YouTube video ID to be show in video questions. |
| 1153 core.String videoId; | 1130 core.String videoId; |
| 1154 | 1131 |
| 1155 SurveyQuestion(); | 1132 SurveyQuestion(); |
| 1156 | 1133 |
| 1157 SurveyQuestion.fromJson(core.Map _json) { | 1134 SurveyQuestion.fromJson(core.Map _json) { |
| 1158 if (_json.containsKey("answerOrder")) { | 1135 if (_json.containsKey("answerOrder")) { |
| 1159 answerOrder = _json["answerOrder"]; | 1136 answerOrder = _json["answerOrder"]; |
| 1160 } | 1137 } |
| 1161 if (_json.containsKey("answers")) { | 1138 if (_json.containsKey("answers")) { |
| 1162 answers = _json["answers"]; | 1139 answers = _json["answers"]; |
| 1163 } | 1140 } |
| 1164 if (_json.containsKey("hasOther")) { | 1141 if (_json.containsKey("hasOther")) { |
| 1165 hasOther = _json["hasOther"]; | 1142 hasOther = _json["hasOther"]; |
| 1166 } | 1143 } |
| 1167 if (_json.containsKey("highValueLabel")) { | 1144 if (_json.containsKey("highValueLabel")) { |
| 1168 highValueLabel = _json["highValueLabel"]; | 1145 highValueLabel = _json["highValueLabel"]; |
| 1169 } | 1146 } |
| 1170 if (_json.containsKey("images")) { | 1147 if (_json.containsKey("images")) { |
| 1171 images = _json["images"].map((value) => new SurveyQuestionImage.fromJson(v
alue)).toList(); | 1148 images = _json["images"] |
| 1149 .map((value) => new SurveyQuestionImage.fromJson(value)) |
| 1150 .toList(); |
| 1172 } | 1151 } |
| 1173 if (_json.containsKey("lastAnswerPositionPinned")) { | 1152 if (_json.containsKey("lastAnswerPositionPinned")) { |
| 1174 lastAnswerPositionPinned = _json["lastAnswerPositionPinned"]; | 1153 lastAnswerPositionPinned = _json["lastAnswerPositionPinned"]; |
| 1175 } | 1154 } |
| 1176 if (_json.containsKey("lowValueLabel")) { | 1155 if (_json.containsKey("lowValueLabel")) { |
| 1177 lowValueLabel = _json["lowValueLabel"]; | 1156 lowValueLabel = _json["lowValueLabel"]; |
| 1178 } | 1157 } |
| 1179 if (_json.containsKey("mustPickSuggestion")) { | 1158 if (_json.containsKey("mustPickSuggestion")) { |
| 1180 mustPickSuggestion = _json["mustPickSuggestion"]; | 1159 mustPickSuggestion = _json["mustPickSuggestion"]; |
| 1181 } | 1160 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1205 } | 1184 } |
| 1206 if (_json.containsKey("unitOfMeasurementLabel")) { | 1185 if (_json.containsKey("unitOfMeasurementLabel")) { |
| 1207 unitOfMeasurementLabel = _json["unitOfMeasurementLabel"]; | 1186 unitOfMeasurementLabel = _json["unitOfMeasurementLabel"]; |
| 1208 } | 1187 } |
| 1209 if (_json.containsKey("videoId")) { | 1188 if (_json.containsKey("videoId")) { |
| 1210 videoId = _json["videoId"]; | 1189 videoId = _json["videoId"]; |
| 1211 } | 1190 } |
| 1212 } | 1191 } |
| 1213 | 1192 |
| 1214 core.Map<core.String, core.Object> toJson() { | 1193 core.Map<core.String, core.Object> toJson() { |
| 1215 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1194 final core.Map<core.String, core.Object> _json = |
| 1195 new core.Map<core.String, core.Object>(); |
| 1216 if (answerOrder != null) { | 1196 if (answerOrder != null) { |
| 1217 _json["answerOrder"] = answerOrder; | 1197 _json["answerOrder"] = answerOrder; |
| 1218 } | 1198 } |
| 1219 if (answers != null) { | 1199 if (answers != null) { |
| 1220 _json["answers"] = answers; | 1200 _json["answers"] = answers; |
| 1221 } | 1201 } |
| 1222 if (hasOther != null) { | 1202 if (hasOther != null) { |
| 1223 _json["hasOther"] = hasOther; | 1203 _json["hasOther"] = hasOther; |
| 1224 } | 1204 } |
| 1225 if (highValueLabel != null) { | 1205 if (highValueLabel != null) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 if (unitOfMeasurementLabel != null) { | 1244 if (unitOfMeasurementLabel != null) { |
| 1265 _json["unitOfMeasurementLabel"] = unitOfMeasurementLabel; | 1245 _json["unitOfMeasurementLabel"] = unitOfMeasurementLabel; |
| 1266 } | 1246 } |
| 1267 if (videoId != null) { | 1247 if (videoId != null) { |
| 1268 _json["videoId"] = videoId; | 1248 _json["videoId"] = videoId; |
| 1269 } | 1249 } |
| 1270 return _json; | 1250 return _json; |
| 1271 } | 1251 } |
| 1272 } | 1252 } |
| 1273 | 1253 |
| 1274 /** Container object for image data and alt_text. */ | 1254 /// Container object for image data and alt_text. |
| 1275 class SurveyQuestionImage { | 1255 class SurveyQuestionImage { |
| 1276 /** The alt text property used in image tags is required for all images. */ | 1256 /// The alt text property used in image tags is required for all images. |
| 1277 core.String altText; | 1257 core.String altText; |
| 1278 /** | 1258 |
| 1279 * Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question | 1259 /// Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question |
| 1280 * types. | 1260 /// types. |
| 1281 */ | |
| 1282 core.String data; | 1261 core.String data; |
| 1283 core.List<core.int> get dataAsBytes { | 1262 core.List<core.int> get dataAsBytes { |
| 1284 return convert.BASE64.decode(data); | 1263 return convert.BASE64.decode(data); |
| 1285 } | 1264 } |
| 1286 | 1265 |
| 1287 void set dataAsBytes(core.List<core.int> _bytes) { | 1266 void set dataAsBytes(core.List<core.int> _bytes) { |
| 1288 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 1267 data = |
| 1268 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
| 1289 } | 1269 } |
| 1290 /** The read-only URL for the hosted images. */ | 1270 |
| 1271 /// The read-only URL for the hosted images. |
| 1291 core.String url; | 1272 core.String url; |
| 1292 | 1273 |
| 1293 SurveyQuestionImage(); | 1274 SurveyQuestionImage(); |
| 1294 | 1275 |
| 1295 SurveyQuestionImage.fromJson(core.Map _json) { | 1276 SurveyQuestionImage.fromJson(core.Map _json) { |
| 1296 if (_json.containsKey("altText")) { | 1277 if (_json.containsKey("altText")) { |
| 1297 altText = _json["altText"]; | 1278 altText = _json["altText"]; |
| 1298 } | 1279 } |
| 1299 if (_json.containsKey("data")) { | 1280 if (_json.containsKey("data")) { |
| 1300 data = _json["data"]; | 1281 data = _json["data"]; |
| 1301 } | 1282 } |
| 1302 if (_json.containsKey("url")) { | 1283 if (_json.containsKey("url")) { |
| 1303 url = _json["url"]; | 1284 url = _json["url"]; |
| 1304 } | 1285 } |
| 1305 } | 1286 } |
| 1306 | 1287 |
| 1307 core.Map<core.String, core.Object> toJson() { | 1288 core.Map<core.String, core.Object> toJson() { |
| 1308 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1289 final core.Map<core.String, core.Object> _json = |
| 1290 new core.Map<core.String, core.Object>(); |
| 1309 if (altText != null) { | 1291 if (altText != null) { |
| 1310 _json["altText"] = altText; | 1292 _json["altText"] = altText; |
| 1311 } | 1293 } |
| 1312 if (data != null) { | 1294 if (data != null) { |
| 1313 _json["data"] = data; | 1295 _json["data"] = data; |
| 1314 } | 1296 } |
| 1315 if (url != null) { | 1297 if (url != null) { |
| 1316 _json["url"] = url; | 1298 _json["url"] = url; |
| 1317 } | 1299 } |
| 1318 return _json; | 1300 return _json; |
| 1319 } | 1301 } |
| 1320 } | 1302 } |
| 1321 | 1303 |
| 1322 /** Message representing why the survey was rejected from review, if it was. */ | 1304 /// Message representing why the survey was rejected from review, if it was. |
| 1323 class SurveyRejection { | 1305 class SurveyRejection { |
| 1324 /** A human-readable explanation of what was wrong with the survey. */ | 1306 /// A human-readable explanation of what was wrong with the survey. |
| 1325 core.String explanation; | 1307 core.String explanation; |
| 1326 /** | 1308 |
| 1327 * Which category of rejection this was. See the Google Surveys Help Center | 1309 /// Which category of rejection this was. See the Google Surveys Help Center |
| 1328 * for additional details on each category. | 1310 /// for additional details on each category. |
| 1329 */ | |
| 1330 core.String type; | 1311 core.String type; |
| 1331 | 1312 |
| 1332 SurveyRejection(); | 1313 SurveyRejection(); |
| 1333 | 1314 |
| 1334 SurveyRejection.fromJson(core.Map _json) { | 1315 SurveyRejection.fromJson(core.Map _json) { |
| 1335 if (_json.containsKey("explanation")) { | 1316 if (_json.containsKey("explanation")) { |
| 1336 explanation = _json["explanation"]; | 1317 explanation = _json["explanation"]; |
| 1337 } | 1318 } |
| 1338 if (_json.containsKey("type")) { | 1319 if (_json.containsKey("type")) { |
| 1339 type = _json["type"]; | 1320 type = _json["type"]; |
| 1340 } | 1321 } |
| 1341 } | 1322 } |
| 1342 | 1323 |
| 1343 core.Map<core.String, core.Object> toJson() { | 1324 core.Map<core.String, core.Object> toJson() { |
| 1344 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1325 final core.Map<core.String, core.Object> _json = |
| 1326 new core.Map<core.String, core.Object>(); |
| 1345 if (explanation != null) { | 1327 if (explanation != null) { |
| 1346 _json["explanation"] = explanation; | 1328 _json["explanation"] = explanation; |
| 1347 } | 1329 } |
| 1348 if (type != null) { | 1330 if (type != null) { |
| 1349 _json["type"] = type; | 1331 _json["type"] = type; |
| 1350 } | 1332 } |
| 1351 return _json; | 1333 return _json; |
| 1352 } | 1334 } |
| 1353 } | 1335 } |
| 1354 | 1336 |
| 1355 /** Reference to the current results for a given survey. */ | 1337 /// Reference to the current results for a given survey. |
| 1356 class SurveyResults { | 1338 class SurveyResults { |
| 1357 /** Human readable string describing the status of the request. */ | 1339 /// Human readable string describing the status of the request. |
| 1358 core.String status; | 1340 core.String status; |
| 1359 /** External survey ID as viewable by survey owners in the editor view. */ | 1341 |
| 1342 /// External survey ID as viewable by survey owners in the editor view. |
| 1360 core.String surveyUrlId; | 1343 core.String surveyUrlId; |
| 1361 | 1344 |
| 1362 SurveyResults(); | 1345 SurveyResults(); |
| 1363 | 1346 |
| 1364 SurveyResults.fromJson(core.Map _json) { | 1347 SurveyResults.fromJson(core.Map _json) { |
| 1365 if (_json.containsKey("status")) { | 1348 if (_json.containsKey("status")) { |
| 1366 status = _json["status"]; | 1349 status = _json["status"]; |
| 1367 } | 1350 } |
| 1368 if (_json.containsKey("surveyUrlId")) { | 1351 if (_json.containsKey("surveyUrlId")) { |
| 1369 surveyUrlId = _json["surveyUrlId"]; | 1352 surveyUrlId = _json["surveyUrlId"]; |
| 1370 } | 1353 } |
| 1371 } | 1354 } |
| 1372 | 1355 |
| 1373 core.Map<core.String, core.Object> toJson() { | 1356 core.Map<core.String, core.Object> toJson() { |
| 1374 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1357 final core.Map<core.String, core.Object> _json = |
| 1358 new core.Map<core.String, core.Object>(); |
| 1375 if (status != null) { | 1359 if (status != null) { |
| 1376 _json["status"] = status; | 1360 _json["status"] = status; |
| 1377 } | 1361 } |
| 1378 if (surveyUrlId != null) { | 1362 if (surveyUrlId != null) { |
| 1379 _json["surveyUrlId"] = surveyUrlId; | 1363 _json["surveyUrlId"] = surveyUrlId; |
| 1380 } | 1364 } |
| 1381 return _json; | 1365 return _json; |
| 1382 } | 1366 } |
| 1383 } | 1367 } |
| 1384 | 1368 |
| 1385 class SurveysDeleteResponse { | 1369 class SurveysDeleteResponse { |
| 1386 /** | 1370 /// Unique request ID used for logging and debugging. Please include in any |
| 1387 * Unique request ID used for logging and debugging. Please include in any | 1371 /// error reporting or troubleshooting requests. |
| 1388 * error reporting or troubleshooting requests. | |
| 1389 */ | |
| 1390 core.String requestId; | 1372 core.String requestId; |
| 1391 | 1373 |
| 1392 SurveysDeleteResponse(); | 1374 SurveysDeleteResponse(); |
| 1393 | 1375 |
| 1394 SurveysDeleteResponse.fromJson(core.Map _json) { | 1376 SurveysDeleteResponse.fromJson(core.Map _json) { |
| 1395 if (_json.containsKey("requestId")) { | 1377 if (_json.containsKey("requestId")) { |
| 1396 requestId = _json["requestId"]; | 1378 requestId = _json["requestId"]; |
| 1397 } | 1379 } |
| 1398 } | 1380 } |
| 1399 | 1381 |
| 1400 core.Map<core.String, core.Object> toJson() { | 1382 core.Map<core.String, core.Object> toJson() { |
| 1401 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1383 final core.Map<core.String, core.Object> _json = |
| 1384 new core.Map<core.String, core.Object>(); |
| 1402 if (requestId != null) { | 1385 if (requestId != null) { |
| 1403 _json["requestId"] = requestId; | 1386 _json["requestId"] = requestId; |
| 1404 } | 1387 } |
| 1405 return _json; | 1388 return _json; |
| 1406 } | 1389 } |
| 1407 } | 1390 } |
| 1408 | 1391 |
| 1409 class SurveysListResponse { | 1392 class SurveysListResponse { |
| 1410 PageInfo pageInfo; | 1393 PageInfo pageInfo; |
| 1411 /** | 1394 |
| 1412 * Unique request ID used for logging and debugging. Please include in any | 1395 /// Unique request ID used for logging and debugging. Please include in any |
| 1413 * error reporting or troubleshooting requests. | 1396 /// error reporting or troubleshooting requests. |
| 1414 */ | |
| 1415 core.String requestId; | 1397 core.String requestId; |
| 1416 /** An individual survey resource. */ | 1398 |
| 1399 /// An individual survey resource. |
| 1417 core.List<Survey> resources; | 1400 core.List<Survey> resources; |
| 1418 TokenPagination tokenPagination; | 1401 TokenPagination tokenPagination; |
| 1419 | 1402 |
| 1420 SurveysListResponse(); | 1403 SurveysListResponse(); |
| 1421 | 1404 |
| 1422 SurveysListResponse.fromJson(core.Map _json) { | 1405 SurveysListResponse.fromJson(core.Map _json) { |
| 1423 if (_json.containsKey("pageInfo")) { | 1406 if (_json.containsKey("pageInfo")) { |
| 1424 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); | 1407 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 1425 } | 1408 } |
| 1426 if (_json.containsKey("requestId")) { | 1409 if (_json.containsKey("requestId")) { |
| 1427 requestId = _json["requestId"]; | 1410 requestId = _json["requestId"]; |
| 1428 } | 1411 } |
| 1429 if (_json.containsKey("resources")) { | 1412 if (_json.containsKey("resources")) { |
| 1430 resources = _json["resources"].map((value) => new Survey.fromJson(value)).
toList(); | 1413 resources = _json["resources"] |
| 1414 .map((value) => new Survey.fromJson(value)) |
| 1415 .toList(); |
| 1431 } | 1416 } |
| 1432 if (_json.containsKey("tokenPagination")) { | 1417 if (_json.containsKey("tokenPagination")) { |
| 1433 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); | 1418 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 1434 } | 1419 } |
| 1435 } | 1420 } |
| 1436 | 1421 |
| 1437 core.Map<core.String, core.Object> toJson() { | 1422 core.Map<core.String, core.Object> toJson() { |
| 1438 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1423 final core.Map<core.String, core.Object> _json = |
| 1424 new core.Map<core.String, core.Object>(); |
| 1439 if (pageInfo != null) { | 1425 if (pageInfo != null) { |
| 1440 _json["pageInfo"] = (pageInfo).toJson(); | 1426 _json["pageInfo"] = (pageInfo).toJson(); |
| 1441 } | 1427 } |
| 1442 if (requestId != null) { | 1428 if (requestId != null) { |
| 1443 _json["requestId"] = requestId; | 1429 _json["requestId"] = requestId; |
| 1444 } | 1430 } |
| 1445 if (resources != null) { | 1431 if (resources != null) { |
| 1446 _json["resources"] = resources.map((value) => (value).toJson()).toList(); | 1432 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 1447 } | 1433 } |
| 1448 if (tokenPagination != null) { | 1434 if (tokenPagination != null) { |
| 1449 _json["tokenPagination"] = (tokenPagination).toJson(); | 1435 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 1450 } | 1436 } |
| 1451 return _json; | 1437 return _json; |
| 1452 } | 1438 } |
| 1453 } | 1439 } |
| 1454 | 1440 |
| 1455 class SurveysStartRequest { | 1441 class SurveysStartRequest { |
| 1456 /** | 1442 /// Threshold to start a survey automically if the quoted prices is less than |
| 1457 * Threshold to start a survey automically if the quoted prices is less than | 1443 /// or equal to this value. See Survey.Cost for more details. |
| 1458 * or equal to this value. See Survey.Cost for more details. | |
| 1459 */ | |
| 1460 core.String maxCostPerResponseNanos; | 1444 core.String maxCostPerResponseNanos; |
| 1461 | 1445 |
| 1462 SurveysStartRequest(); | 1446 SurveysStartRequest(); |
| 1463 | 1447 |
| 1464 SurveysStartRequest.fromJson(core.Map _json) { | 1448 SurveysStartRequest.fromJson(core.Map _json) { |
| 1465 if (_json.containsKey("maxCostPerResponseNanos")) { | 1449 if (_json.containsKey("maxCostPerResponseNanos")) { |
| 1466 maxCostPerResponseNanos = _json["maxCostPerResponseNanos"]; | 1450 maxCostPerResponseNanos = _json["maxCostPerResponseNanos"]; |
| 1467 } | 1451 } |
| 1468 } | 1452 } |
| 1469 | 1453 |
| 1470 core.Map<core.String, core.Object> toJson() { | 1454 core.Map<core.String, core.Object> toJson() { |
| 1471 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1455 final core.Map<core.String, core.Object> _json = |
| 1456 new core.Map<core.String, core.Object>(); |
| 1472 if (maxCostPerResponseNanos != null) { | 1457 if (maxCostPerResponseNanos != null) { |
| 1473 _json["maxCostPerResponseNanos"] = maxCostPerResponseNanos; | 1458 _json["maxCostPerResponseNanos"] = maxCostPerResponseNanos; |
| 1474 } | 1459 } |
| 1475 return _json; | 1460 return _json; |
| 1476 } | 1461 } |
| 1477 } | 1462 } |
| 1478 | 1463 |
| 1479 class SurveysStartResponse { | 1464 class SurveysStartResponse { |
| 1480 /** | 1465 /// Unique request ID used for logging and debugging. Please include in any |
| 1481 * Unique request ID used for logging and debugging. Please include in any | 1466 /// error reporting or troubleshooting requests. |
| 1482 * error reporting or troubleshooting requests. | |
| 1483 */ | |
| 1484 core.String requestId; | 1467 core.String requestId; |
| 1485 | 1468 |
| 1486 SurveysStartResponse(); | 1469 SurveysStartResponse(); |
| 1487 | 1470 |
| 1488 SurveysStartResponse.fromJson(core.Map _json) { | 1471 SurveysStartResponse.fromJson(core.Map _json) { |
| 1489 if (_json.containsKey("requestId")) { | 1472 if (_json.containsKey("requestId")) { |
| 1490 requestId = _json["requestId"]; | 1473 requestId = _json["requestId"]; |
| 1491 } | 1474 } |
| 1492 } | 1475 } |
| 1493 | 1476 |
| 1494 core.Map<core.String, core.Object> toJson() { | 1477 core.Map<core.String, core.Object> toJson() { |
| 1495 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1478 final core.Map<core.String, core.Object> _json = |
| 1479 new core.Map<core.String, core.Object>(); |
| 1496 if (requestId != null) { | 1480 if (requestId != null) { |
| 1497 _json["requestId"] = requestId; | 1481 _json["requestId"] = requestId; |
| 1498 } | 1482 } |
| 1499 return _json; | 1483 return _json; |
| 1500 } | 1484 } |
| 1501 } | 1485 } |
| 1502 | 1486 |
| 1503 class SurveysStopResponse { | 1487 class SurveysStopResponse { |
| 1504 /** | 1488 /// Unique request ID used for logging and debugging. Please include in any |
| 1505 * Unique request ID used for logging and debugging. Please include in any | 1489 /// error reporting or troubleshooting requests. |
| 1506 * error reporting or troubleshooting requests. | |
| 1507 */ | |
| 1508 core.String requestId; | 1490 core.String requestId; |
| 1509 | 1491 |
| 1510 SurveysStopResponse(); | 1492 SurveysStopResponse(); |
| 1511 | 1493 |
| 1512 SurveysStopResponse.fromJson(core.Map _json) { | 1494 SurveysStopResponse.fromJson(core.Map _json) { |
| 1513 if (_json.containsKey("requestId")) { | 1495 if (_json.containsKey("requestId")) { |
| 1514 requestId = _json["requestId"]; | 1496 requestId = _json["requestId"]; |
| 1515 } | 1497 } |
| 1516 } | 1498 } |
| 1517 | 1499 |
| 1518 core.Map<core.String, core.Object> toJson() { | 1500 core.Map<core.String, core.Object> toJson() { |
| 1519 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1501 final core.Map<core.String, core.Object> _json = |
| 1502 new core.Map<core.String, core.Object>(); |
| 1520 if (requestId != null) { | 1503 if (requestId != null) { |
| 1521 _json["requestId"] = requestId; | 1504 _json["requestId"] = requestId; |
| 1522 } | 1505 } |
| 1523 return _json; | 1506 return _json; |
| 1524 } | 1507 } |
| 1525 } | 1508 } |
| 1526 | 1509 |
| 1527 class TokenPagination { | 1510 class TokenPagination { |
| 1528 core.String nextPageToken; | 1511 core.String nextPageToken; |
| 1529 core.String previousPageToken; | 1512 core.String previousPageToken; |
| 1530 | 1513 |
| 1531 TokenPagination(); | 1514 TokenPagination(); |
| 1532 | 1515 |
| 1533 TokenPagination.fromJson(core.Map _json) { | 1516 TokenPagination.fromJson(core.Map _json) { |
| 1534 if (_json.containsKey("nextPageToken")) { | 1517 if (_json.containsKey("nextPageToken")) { |
| 1535 nextPageToken = _json["nextPageToken"]; | 1518 nextPageToken = _json["nextPageToken"]; |
| 1536 } | 1519 } |
| 1537 if (_json.containsKey("previousPageToken")) { | 1520 if (_json.containsKey("previousPageToken")) { |
| 1538 previousPageToken = _json["previousPageToken"]; | 1521 previousPageToken = _json["previousPageToken"]; |
| 1539 } | 1522 } |
| 1540 } | 1523 } |
| 1541 | 1524 |
| 1542 core.Map<core.String, core.Object> toJson() { | 1525 core.Map<core.String, core.Object> toJson() { |
| 1543 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1526 final core.Map<core.String, core.Object> _json = |
| 1527 new core.Map<core.String, core.Object>(); |
| 1544 if (nextPageToken != null) { | 1528 if (nextPageToken != null) { |
| 1545 _json["nextPageToken"] = nextPageToken; | 1529 _json["nextPageToken"] = nextPageToken; |
| 1546 } | 1530 } |
| 1547 if (previousPageToken != null) { | 1531 if (previousPageToken != null) { |
| 1548 _json["previousPageToken"] = previousPageToken; | 1532 _json["previousPageToken"] = previousPageToken; |
| 1549 } | 1533 } |
| 1550 return _json; | 1534 return _json; |
| 1551 } | 1535 } |
| 1552 } | 1536 } |
| OLD | NEW |