Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: generated/googleapis/lib/surveys/v2.dart

Issue 2485703002: Api-roll 42: 2016-11-08 (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « generated/googleapis/lib/storage/v1.dart ('k') | generated/googleapis/lib/vision/v1.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: generated/googleapis/lib/surveys/v2.dart
diff --git a/generated/googleapis/lib/consumersurveys/v2.dart b/generated/googleapis/lib/surveys/v2.dart
similarity index 96%
copy from generated/googleapis/lib/consumersurveys/v2.dart
copy to generated/googleapis/lib/surveys/v2.dart
index 5dc1689695c707d364ed7a99bc2cbade18750118..574f55848f0a932d4592a9c4405bb8920e917e19 100644
--- a/generated/googleapis/lib/consumersurveys/v2.dart
+++ b/generated/googleapis/lib/surveys/v2.dart
@@ -1,6 +1,6 @@
// This is a generated file (see the discoveryapis_generator project).
-library googleapis.consumersurveys.v2;
+library googleapis.surveys.v2;
import 'dart:core' as core;
import 'dart:async' as async;
@@ -14,18 +14,18 @@ export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
ResumableUploadOptions, DownloadOptions, PartialDownloadOptions,
ByteRange;
-const core.String USER_AGENT = 'dart-api-client consumersurveys/v2';
+const core.String USER_AGENT = 'dart-api-client surveys/v2';
/**
* Creates and conducts surveys, lists the surveys that an authenticated user
* owns, and retrieves survey results and information about specified surveys.
*/
-class ConsumersurveysApi {
- /** View and edit your surveys and results */
- static const ConsumersurveysScope = "https://www.googleapis.com/auth/consumersurveys";
+class SurveysApi {
+ /** View and manage your surveys and results */
+ static const SurveysScope = "https://www.googleapis.com/auth/surveys";
- /** View the results for your surveys */
- static const ConsumersurveysReadonlyScope = "https://www.googleapis.com/auth/consumersurveys.readonly";
+ /** View your surveys and survey results */
+ static const SurveysReadonlyScope = "https://www.googleapis.com/auth/surveys.readonly";
/** View your email address */
static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email";
@@ -37,7 +37,7 @@ class ConsumersurveysApi {
ResultsResourceApi get results => new ResultsResourceApi(_requester);
SurveysResourceApi get surveys => new SurveysResourceApi(_requester);
- ConsumersurveysApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com/", core.String servicePath: "consumersurveys/v2/"}) :
+ SurveysApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com/", core.String servicePath: "surveys/v2/"}) :
_requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
}
@@ -192,7 +192,8 @@ class ResultsResourceApi {
/**
* Retrieves any survey results that have been produced so far. Results are
- * formatted as an Excel file.
+ * formatted as an Excel file. You must add "?alt=media" to the URL as an
+ * argument to get results.
*
* [request] - The metadata request object.
*
@@ -820,6 +821,11 @@ class Survey {
core.List<core.String> owners;
/** List of questions defining the survey. */
core.List<SurveyQuestion> questions;
+ /**
+ * Reason for the survey being rejected. Only present if the survey state is
+ * rejected.
+ */
+ SurveyRejection rejectionReason;
/** State that the survey is in. */
core.String state;
/** Unique survey ID, that is viewable in the URL of the Survey Creator UI */
@@ -850,6 +856,9 @@ class Survey {
if (_json.containsKey("questions")) {
questions = _json["questions"].map((value) => new SurveyQuestion.fromJson(value)).toList();
}
+ if (_json.containsKey("rejectionReason")) {
+ rejectionReason = new SurveyRejection.fromJson(_json["rejectionReason"]);
+ }
if (_json.containsKey("state")) {
state = _json["state"];
}
@@ -884,6 +893,9 @@ class Survey {
if (questions != null) {
_json["questions"] = questions.map((value) => (value).toJson()).toList();
}
+ if (rejectionReason != null) {
+ _json["rejectionReason"] = (rejectionReason).toJson();
+ }
if (state != null) {
_json["state"] = state;
}
@@ -1307,6 +1319,39 @@ class SurveyQuestionImage {
}
}
+/** Message representing why the survey was rejected from review, if it was. */
+class SurveyRejection {
+ /** A human-readable explanation of what was wrong with the survey. */
+ core.String explanation;
+ /**
+ * Which category of rejection this was. See the Google Surveys Help Center
+ * for additional details on each category.
+ */
+ core.String type;
+
+ SurveyRejection();
+
+ SurveyRejection.fromJson(core.Map _json) {
+ if (_json.containsKey("explanation")) {
+ explanation = _json["explanation"];
+ }
+ if (_json.containsKey("type")) {
+ type = _json["type"];
+ }
+ }
+
+ core.Map toJson() {
+ var _json = new core.Map();
+ if (explanation != null) {
+ _json["explanation"] = explanation;
+ }
+ if (type != null) {
+ _json["type"] = type;
+ }
+ return _json;
+ }
+}
+
/** Reference to the current results for a given survey. */
class SurveyResults {
/** Human readable string describing the status of the request. */
« no previous file with comments | « generated/googleapis/lib/storage/v1.dart ('k') | generated/googleapis/lib/vision/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698