Index: google_apis/drive/drive_api_parser.h |
diff --git a/google_apis/drive/drive_api_parser.h b/google_apis/drive/drive_api_parser.h |
index 477ccfb4f7fbd1aa8a6ecaeba835008af852d2c4..60b586c659bd9b980897fcc382984f4240ab659a 100644 |
--- a/google_apis/drive/drive_api_parser.h |
+++ b/google_apis/drive/drive_api_parser.h |
@@ -964,6 +964,44 @@ class ChangeList { |
DISALLOW_COPY_AND_ASSIGN(ChangeList); |
}; |
+// StartPageToken is the starting pageToken for listing future changes. |
+// https://developers.google.com/drive/v2/reference/changes/getStartPageToken |
+class StartPageToken { |
+ public: |
+ StartPageToken(); |
+ ~StartPageToken(); |
+ |
+ // Registers the mapping between JSON field names and the members in this |
+ // class. |
+ static void RegisterJSONConverter( |
+ base::JSONValueConverter<StartPageToken>* converter); |
+ |
+ // Returns true if the |value| has kind field for StartPageToken. |
+ static bool HasStartPageTokenKind(const base::Value& value); |
+ |
+ // Creates an instance from parsed JSON. |
+ static std::unique_ptr<StartPageToken> CreateFrom(const base::Value& value); |
+ |
+ // Returns the starting page token for listing future changes. |
+ const std::string& start_page_token() const { return start_page_token_; } |
+ |
+ void set_start_page_token(const std::string& start_page_token) { |
+ start_page_token_ = start_page_token; |
+ } |
+ |
+ private: |
+ friend class DriveAPIParserTest; |
+ FRIEND_TEST_ALL_PREFIXES(DriveAPIParserTest, StartPageTokenParser); |
+ |
+ // Parses and initializes data members from content of |value|. |
+ // Return false if parsing fails. |
+ bool Parse(const base::Value& value); |
+ |
+ std::string start_page_token_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(StartPageToken); |
+}; |
+ |
} // namespace google_apis |
#endif // GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ |