Generator Build | 2015-11-16 19:10:01 UTC
*
*
* \section ForMoreInfo For More Information
@@ -728,48 +723,6 @@ class AppsResource_ListMethod : public DriveServiceBaseRequest {
virtual ~AppsResource_ListMethod();
- /**
- * Clears the 'languageCode ' attribute so it is no longer set.
- */
- void clear_language_code() {
- _have_language_code_ = false;
- client::ClearCppValueHelper(&language_code_);
- }
-
-
- /**
- * Gets the optional 'languageCode ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_language_code() const { return language_code_; }
-
- /**
- * Gets a modifiable pointer to the optional languageCode '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_languageCode() {
- _have_language_code_ = true;
- return &language_code_;
- }
-
-
- /**
- * Sets the 'languageCode ' attribute.
- *
- * @param[in] value A language or locale code, as defined by BCP 47, with
- * some extensions from Unicode's LDML format
- * (http://www.unicode.org/reports/tr35/).
- */
- void set_language_code(const string& value) {
- _have_language_code_ = true;
- language_code_ = value;
- }
-
-
-
/**
* Clears the 'appFilterExtensions ' attribute so it is no
* longer set.
@@ -858,6 +811,48 @@ class AppsResource_ListMethod : public DriveServiceBaseRequest {
app_filter_mime_types_ = value;
}
+
+
+ /**
+ * Clears the 'languageCode ' attribute so it is no longer set.
+ */
+ void clear_language_code() {
+ _have_language_code_ = false;
+ client::ClearCppValueHelper(&language_code_);
+ }
+
+
+ /**
+ * Gets the optional 'languageCode ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_language_code() const { return language_code_; }
+
+ /**
+ * Gets a modifiable pointer to the optional languageCode '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_languageCode() {
+ _have_language_code_ = true;
+ return &language_code_;
+ }
+
+
+ /**
+ * Sets the 'languageCode ' attribute.
+ *
+ * @param[in] value A language or locale code, as defined by BCP 47, with
+ * some extensions from Unicode's LDML format
+ * (http://www.unicode.org/reports/tr35/).
+ */
+ void set_language_code(const string& value) {
+ _have_language_code_ = true;
+ language_code_ = value;
+ }
+
/**
* Appends variable value to the target string.
*
@@ -896,12 +891,12 @@ class AppsResource_ListMethod : public DriveServiceBaseRequest {
}
private:
- string language_code_;
string app_filter_extensions_;
string app_filter_mime_types_;
- bool _have_language_code_ : 1;
+ string language_code_;
bool _have_app_filter_extensions_ : 1;
bool _have_app_filter_mime_types_ : 1;
+ bool _have_language_code_ : 1;
DISALLOW_COPY_AND_ASSIGN(AppsResource_ListMethod);
};
@@ -947,6 +942,71 @@ class ChangesResource_GetMethod : public DriveServiceBaseRequest {
virtual ~ChangesResource_GetMethod();
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Clears the 'teamDriveId ' attribute so it is no longer set.
+ */
+ void clear_team_drive_id() {
+ _have_team_drive_id_ = false;
+ client::ClearCppValueHelper(&team_drive_id_);
+ }
+
+
+ /**
+ * Gets the optional 'teamDriveId ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_team_drive_id() const { return team_drive_id_; }
+
+ /**
+ * Gets a modifiable pointer to the optional teamDriveId '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_teamDriveId() {
+ _have_team_drive_id_ = true;
+ return &team_drive_id_;
+ }
+
+
+ /**
+ * Sets the 'teamDriveId ' attribute.
+ *
+ * @param[in] value The Team Drive from which the change will be returned.
+ */
+ void set_team_drive_id(const string& value) {
+ _have_team_drive_id_ = true;
+ team_drive_id_ = value;
+ }
+
/**
* Appends variable value to the target string.
*
@@ -961,6 +1021,13 @@ class ChangesResource_GetMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
/**
* Executes the method and parses the response into a data object on success.
@@ -979,11 +1046,15 @@ class ChangesResource_GetMethod : public DriveServiceBaseRequest {
private:
string change_id_;
+ bool supports_team_drives_;
+ string team_drive_id_;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_team_drive_id_ : 1;
DISALLOW_COPY_AND_ASSIGN(ChangesResource_GetMethod);
};
/**
- * Implements the list method.
+ * Implements the getStartPageToken method.
*
* @ingroup ServiceMethod
*
@@ -1001,7 +1072,7 @@ class ChangesResource_GetMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class ChangesResource_ListMethod : public DriveServiceBaseRequest {
+class ChangesResource_GetStartPageTokenMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -1010,225 +1081,103 @@ class ChangesResource_ListMethod : public DriveServiceBaseRequest {
* In practice this is supplied by the user code that is
* creating the method instance.
*/
- ChangesResource_ListMethod(
+ ChangesResource_GetStartPageTokenMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_);
/**
* Standard destructor.
*/
- virtual ~ChangesResource_ListMethod();
-
-
- /**
- * Clears the 'includeSubscribed ' attribute so it is no longer
- * set.
- */
- void clear_include_subscribed() {
- _have_include_subscribed_ = false;
- client::ClearCppValueHelper(&include_subscribed_);
- }
-
-
- /**
- * Gets the optional 'includeSubscribed ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_include_subscribed() const { return include_subscribed_; }
+ virtual ~ChangesResource_GetStartPageTokenMethod();
- /**
- * Sets the 'includeSubscribed ' attribute.
- *
- * @param[in] value Whether to include public files the user has opened and
- * shared files. When set to false, the list only includes owned files plus
- * any shared or public files the user has explicitly added to a folder they
- * own.
- */
- void set_include_subscribed(bool value) {
- _have_include_subscribed_ = true;
- include_subscribed_ = value;
- }
/**
- * Clears the 'includeDeleted ' attribute so it is no longer
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
* set.
*/
- void clear_include_deleted() {
- _have_include_deleted_ = false;
- client::ClearCppValueHelper(&include_deleted_);
- }
-
-
- /**
- * Gets the optional 'includeDeleted ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_include_deleted() const { return include_deleted_; }
-
- /**
- * Sets the 'includeDeleted ' attribute.
- *
- * @param[in] value Whether to include deleted items.
- */
- void set_include_deleted(bool value) {
- _have_include_deleted_ = true;
- include_deleted_ = value;
- }
-
- /**
- * Clears the 'maxResults ' attribute so it is no longer set.
- */
- void clear_max_results() {
- _have_max_results_ = false;
- client::ClearCppValueHelper(&max_results_);
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
}
/**
- * Gets the optional 'maxResults ' attribute.
+ * Gets the optional 'supportsTeamDrives ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- int32 get_max_results() const { return max_results_; }
+ bool get_supports_team_drives() const { return supports_team_drives_; }
/**
- * Sets the 'maxResults ' attribute.
+ * Sets the 'supportsTeamDrives ' attribute.
*
- * @param[in] value Maximum number of changes to return.
+ * @param[in] value Whether the requesting application supports Team Drives.
*/
- void set_max_results(int32 value) {
- _have_max_results_ = true;
- max_results_ = value;
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
}
/**
- * Clears the 'pageToken ' attribute so it is no longer set.
+ * Clears the 'teamDriveId ' attribute so it is no longer set.
*/
- void clear_page_token() {
- _have_page_token_ = false;
- client::ClearCppValueHelper(&page_token_);
+ void clear_team_drive_id() {
+ _have_team_drive_id_ = false;
+ client::ClearCppValueHelper(&team_drive_id_);
}
/**
- * Gets the optional 'pageToken ' attribute.
+ * Gets the optional 'teamDriveId ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_page_token() const { return page_token_; }
+ const string& get_team_drive_id() const { return team_drive_id_; }
/**
- * Gets a modifiable pointer to the optional pageToken '
+ * Gets a modifiable pointer to the optional teamDriveId '
* attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_pageToken() {
- _have_page_token_ = true;
- return &page_token_;
+ string* mutable_teamDriveId() {
+ _have_team_drive_id_ = true;
+ return &team_drive_id_;
}
/**
- * Sets the 'pageToken ' attribute.
+ * Sets the 'teamDriveId ' attribute.
*
- * @param[in] value Page token for changes.
+ * @param[in] value The ID of the Team Drive for which the starting
+ * pageToken for listing future changes from that Team Drive will be
+ * returned.
*/
- void set_page_token(const string& value) {
- _have_page_token_ = true;
- page_token_ = value;
+ void set_team_drive_id(const string& value) {
+ _have_team_drive_id_ = true;
+ team_drive_id_ = value;
}
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
-
- /**
- * Clears the 'spaces ' attribute so it is no longer set.
- */
- void clear_spaces() {
- _have_spaces_ = false;
- client::ClearCppValueHelper(&spaces_);
- }
-
-
- /**
- * Gets the optional 'spaces ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_spaces() const { return spaces_; }
-
- /**
- * Gets a modifiable pointer to the optional spaces ' attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_spaces() {
- _have_spaces_ = true;
- return &spaces_;
- }
-
-
- /**
- * Sets the 'spaces ' attribute.
- *
- * @param[in] value A comma-separated list of spaces to query. Supported
- * values are 'drive', 'appDataFolder' and 'photos'.
- */
- void set_spaces(const string& value) {
- _have_spaces_ = true;
- spaces_ = value;
- }
-
-
-
- /**
- * Clears the 'startChangeId ' attribute so it is no longer set.
- */
- void clear_start_change_id() {
- _have_start_change_id_ = false;
- client::ClearCppValueHelper(&start_change_id_);
- }
-
-
- /**
- * Gets the optional 'startChangeId ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- int64 get_start_change_id() const { return start_change_id_; }
-
- /**
- * Sets the 'startChangeId ' attribute.
- *
- * @param[in] value Change ID to start listing changes from.
- */
- void set_start_change_id(int64 value) {
- _have_start_change_id_ = true;
- start_change_id_ = value;
- }
-
- /**
- * Appends variable value to the target string.
- *
- * This is a helper function used to resolve templated variables in the URI.
- *
- * @param[in] variable_name The name of the templated variable.
- * @param[in] config A pass-through parameter used for lists and maps.
- * @param[in, out] target The string to append the value to.
- */
- virtual util::Status AppendVariable(
- const StringPiece& variable_name,
- const client::UriTemplateConfig& config,
- string* target);
-
- /**
- * Appends the optional query parameters to the target URL.
- *
- * @param[in, out] target The URL string to append to.
- */
- virtual util::Status AppendOptionalQueryParameters(string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
/**
@@ -1242,33 +1191,20 @@ class ChangesResource_ListMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- ChangeList* data) {
+ StartPageToken* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- bool include_subscribed_;
- bool include_deleted_;
- int32 max_results_;
- string page_token_;
- string spaces_;
- int64 start_change_id_;
- bool _have_include_subscribed_ : 1;
- bool _have_include_deleted_ : 1;
- bool _have_max_results_ : 1;
- bool _have_page_token_ : 1;
- bool _have_spaces_ : 1;
- bool _have_start_change_id_ : 1;
- DISALLOW_COPY_AND_ASSIGN(ChangesResource_ListMethod);
+ bool supports_team_drives_;
+ string team_drive_id_;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_team_drive_id_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(ChangesResource_GetStartPageTokenMethod);
};
-typedef client::ServiceRequestPager<
- ChangesResource_ListMethod,
- ChangeList>
- ChangesResource_ListMethodPager;
-
/**
- * Implements the watch method.
+ * Implements the list method.
*
* @ingroup ServiceMethod
*
@@ -1286,7 +1222,7 @@ typedef client::ServiceRequestPager<
* https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class ChangesResource_WatchMethod : public DriveServiceBaseRequest {
+class ChangesResource_ListMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -1294,18 +1230,75 @@ class ChangesResource_WatchMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] _content_ The data object to watch.
*/
- ChangesResource_WatchMethod(
+ ChangesResource_ListMethod(
const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const Channel& _content_);
+ client::AuthorizationCredential* _credential_);
/**
* Standard destructor.
*/
- virtual ~ChangesResource_WatchMethod();
+ virtual ~ChangesResource_ListMethod();
+
+
+ /**
+ * Clears the 'includeCorpusRemovals ' attribute so it is no
+ * longer set.
+ */
+ void clear_include_corpus_removals() {
+ _have_include_corpus_removals_ = false;
+ client::ClearCppValueHelper(&include_corpus_removals_);
+ }
+
+
+ /**
+ * Gets the optional 'includeCorpusRemovals ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_include_corpus_removals() const { return include_corpus_removals_; }
+
+ /**
+ * Sets the 'includeCorpusRemovals ' attribute.
+ *
+ * @param[in] value Whether changes should include the file resource if the
+ * file is still accessible by the user at the time of the request, even
+ * when a file was removed from the list of changes and there will be no
+ * further change entries for this file.
+ */
+ void set_include_corpus_removals(bool value) {
+ _have_include_corpus_removals_ = true;
+ include_corpus_removals_ = value;
+ }
+
+ /**
+ * Clears the 'includeDeleted ' attribute so it is no longer
+ * set.
+ */
+ void clear_include_deleted() {
+ _have_include_deleted_ = false;
+ client::ClearCppValueHelper(&include_deleted_);
+ }
+
+
+ /**
+ * Gets the optional 'includeDeleted ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_include_deleted() const { return include_deleted_; }
+ /**
+ * Sets the 'includeDeleted ' attribute.
+ *
+ * @param[in] value Whether to include changes indicating that items have
+ * been removed from the list of changes, for example by deletion or loss of
+ * access.
+ */
+ void set_include_deleted(bool value) {
+ _have_include_deleted_ = true;
+ include_deleted_ = value;
+ }
/**
* Clears the 'includeSubscribed ' attribute so it is no longer
@@ -1338,30 +1331,31 @@ class ChangesResource_WatchMethod : public DriveServiceBaseRequest {
}
/**
- * Clears the 'includeDeleted ' attribute so it is no longer
- * set.
+ * Clears the 'includeTeamDriveItems ' attribute so it is no
+ * longer set.
*/
- void clear_include_deleted() {
- _have_include_deleted_ = false;
- client::ClearCppValueHelper(&include_deleted_);
+ void clear_include_team_drive_items() {
+ _have_include_team_drive_items_ = false;
+ client::ClearCppValueHelper(&include_team_drive_items_);
}
/**
- * Gets the optional 'includeDeleted ' attribute.
+ * Gets the optional 'includeTeamDriveItems ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_include_deleted() const { return include_deleted_; }
+ bool get_include_team_drive_items() const { return include_team_drive_items_; }
/**
- * Sets the 'includeDeleted ' attribute.
+ * Sets the 'includeTeamDriveItems ' attribute.
*
- * @param[in] value Whether to include deleted items.
+ * @param[in] value Whether Team Drive files or changes should be included
+ * in results.
*/
- void set_include_deleted(bool value) {
- _have_include_deleted_ = true;
- include_deleted_ = value;
+ void set_include_team_drive_items(bool value) {
+ _have_include_team_drive_items_ = true;
+ include_team_drive_items_ = value;
}
/**
@@ -1421,7 +1415,9 @@ class ChangesResource_WatchMethod : public DriveServiceBaseRequest {
/**
* Sets the 'pageToken ' attribute.
*
- * @param[in] value Page token for changes.
+ * @param[in] value The token for continuing a previous list request on the
+ * next page. This should be set to the value of 'nextPageToken' from the
+ * previous response or to the response from the getStartPageToken method.
*/
void set_page_token(const string& value) {
_have_page_token_ = true;
@@ -1496,6 +1492,73 @@ class ChangesResource_WatchMethod : public DriveServiceBaseRequest {
start_change_id_ = value;
}
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Clears the 'teamDriveId ' attribute so it is no longer set.
+ */
+ void clear_team_drive_id() {
+ _have_team_drive_id_ = false;
+ client::ClearCppValueHelper(&team_drive_id_);
+ }
+
+
+ /**
+ * Gets the optional 'teamDriveId ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_team_drive_id() const { return team_drive_id_; }
+
+ /**
+ * Gets a modifiable pointer to the optional teamDriveId '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_teamDriveId() {
+ _have_team_drive_id_ = true;
+ return &team_drive_id_;
+ }
+
+
+ /**
+ * Sets the 'teamDriveId ' attribute.
+ *
+ * @param[in] value The Team Drive from which changes will be returned. If
+ * specified the change IDs will be reflective of the Team Drive; use the
+ * combined Team Drive ID and change ID as an identifier.
+ */
+ void set_team_drive_id(const string& value) {
+ _have_team_drive_id_ = true;
+ team_drive_id_ = value;
+ }
+
/**
* Appends variable value to the target string.
*
@@ -1529,30 +1592,41 @@ class ChangesResource_WatchMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Channel* data) {
+ ChangeList* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- bool include_subscribed_;
+ bool include_corpus_removals_;
bool include_deleted_;
+ bool include_subscribed_;
+ bool include_team_drive_items_;
int32 max_results_;
string page_token_;
string spaces_;
int64 start_change_id_;
- bool _have_include_subscribed_ : 1;
+ bool supports_team_drives_;
+ string team_drive_id_;
+ bool _have_include_corpus_removals_ : 1;
bool _have_include_deleted_ : 1;
+ bool _have_include_subscribed_ : 1;
+ bool _have_include_team_drive_items_ : 1;
bool _have_max_results_ : 1;
bool _have_page_token_ : 1;
bool _have_spaces_ : 1;
- bool _have_start_change_id_ : 1; string _content_;
- DISALLOW_COPY_AND_ASSIGN(ChangesResource_WatchMethod);
+ bool _have_start_change_id_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_team_drive_id_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(ChangesResource_ListMethod);
};
-
+typedef client::ServiceRequestPager<
+ ChangesResource_ListMethod,
+ ChangeList>
+ ChangesResource_ListMethodPager;
/**
- * Implements the stop method.
+ * Implements the watch method.
*
* @ingroup ServiceMethod
*
@@ -1570,7 +1644,7 @@ class ChangesResource_WatchMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class ChannelsResource_StopMethod : public DriveServiceBaseRequest {
+class ChangesResource_WatchMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -1578,9 +1652,9 @@ class ChannelsResource_StopMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] _content_ The data object to stop.
+ * @param[in] _content_ The data object to watch.
*/
- ChannelsResource_StopMethod(
+ ChangesResource_WatchMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const Channel& _content_);
@@ -1588,306 +1662,151 @@ class ChannelsResource_StopMethod : public DriveServiceBaseRequest {
/**
* Standard destructor.
*/
- virtual ~ChannelsResource_StopMethod();
-
- private:
- string _content_;
- DISALLOW_COPY_AND_ASSIGN(ChannelsResource_StopMethod);
-};
+ virtual ~ChangesResource_WatchMethod();
+ /**
+ * Clears the 'includeCorpusRemovals ' attribute so it is no
+ * longer set.
+ */
+ void clear_include_corpus_removals() {
+ _have_include_corpus_removals_ = false;
+ client::ClearCppValueHelper(&include_corpus_removals_);
+ }
-/**
- * Implements the delete method.
- *
- * @ingroup ServiceMethod
- *
- * This class uses the Command Pattern. Construct an instance with the required
- * parameters, then set any additional optional parameters by using the
- * attribute setters. To invoke the method, call Execute .
- *
- * One or more of these authorization scopes are required for this method:
- * https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.file
- */
-class ChildrenResource_DeleteMethod : public DriveServiceBaseRequest {
- public:
- /**
- * The standard constructor takes all the required method parameters.
- * @param[in] _service_ The service instance to send to when executed.
- * @param[in] _credential_ If not NULL, the credential to authorize with.
- * In practice this is supplied by the user code that is
- * creating the method instance.
- * @param[in] folder_id The ID of the folder.
- * @param[in] child_id The ID of the child.
- */
- ChildrenResource_DeleteMethod(
- const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const StringPiece& folder_id,
- const StringPiece& child_id);
- /**
- * Standard destructor.
- */
- virtual ~ChildrenResource_DeleteMethod();
-
-
- /**
- * Appends variable value to the target string.
- *
- * This is a helper function used to resolve templated variables in the URI.
- *
- * @param[in] variable_name The name of the templated variable.
- * @param[in] config A pass-through parameter used for lists and maps.
- * @param[in, out] target The string to append the value to.
- */
- virtual util::Status AppendVariable(
- const StringPiece& variable_name,
- const client::UriTemplateConfig& config,
- string* target);
-
-
- private:
- string folder_id_;
- string child_id_;
- DISALLOW_COPY_AND_ASSIGN(ChildrenResource_DeleteMethod);
-};
-
-/**
- * Implements the get method.
- *
- * @ingroup ServiceMethod
- *
- * This class uses the Command Pattern. Construct an instance with the required
- * parameters, then set any additional optional parameters by using the
- * attribute setters. To invoke the method, call Execute .
- *
- * One or more of these authorization scopes are required for this method:
- * https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
- * https://www.googleapis.com/auth/drive.readonly
- */
-class ChildrenResource_GetMethod : public DriveServiceBaseRequest {
- public:
- /**
- * The standard constructor takes all the required method parameters.
- * @param[in] _service_ The service instance to send to when executed.
- * @param[in] _credential_ If not NULL, the credential to authorize with.
- * In practice this is supplied by the user code that is
- * creating the method instance.
- * @param[in] folder_id The ID of the folder.
- * @param[in] child_id The ID of the child.
- */
- ChildrenResource_GetMethod(
- const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const StringPiece& folder_id,
- const StringPiece& child_id);
-
- /**
- * Standard destructor.
- */
- virtual ~ChildrenResource_GetMethod();
-
-
- /**
- * Appends variable value to the target string.
- *
- * This is a helper function used to resolve templated variables in the URI.
- *
- * @param[in] variable_name The name of the templated variable.
- * @param[in] config A pass-through parameter used for lists and maps.
- * @param[in, out] target The string to append the value to.
- */
- virtual util::Status AppendVariable(
- const StringPiece& variable_name,
- const client::UriTemplateConfig& config,
- string* target);
-
-
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- ChildReference* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
-
- private:
- string folder_id_;
- string child_id_;
- DISALLOW_COPY_AND_ASSIGN(ChildrenResource_GetMethod);
-};
-
-/**
- * Implements the insert method.
- *
- * @ingroup ServiceMethod
- *
- * This class uses the Command Pattern. Construct an instance with the required
- * parameters, then set any additional optional parameters by using the
- * attribute setters. To invoke the method, call Execute .
- *
- * One or more of these authorization scopes are required for this method:
- * https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.file
- */
-class ChildrenResource_InsertMethod : public DriveServiceBaseRequest {
- public:
- /**
- * The standard constructor takes all the required method parameters.
- * @param[in] _service_ The service instance to send to when executed.
- * @param[in] _credential_ If not NULL, the credential to authorize with.
- * In practice this is supplied by the user code that is
- * creating the method instance.
- * @param[in] folder_id The ID of the folder.
- * @param[in] _content_ The data object to insert.
- */
- ChildrenResource_InsertMethod(
- const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const StringPiece& folder_id,
- const ChildReference& _content_);
-
- /**
- * Standard destructor.
- */
- virtual ~ChildrenResource_InsertMethod();
-
-
- /**
- * Appends variable value to the target string.
- *
- * This is a helper function used to resolve templated variables in the URI.
- *
- * @param[in] variable_name The name of the templated variable.
- * @param[in] config A pass-through parameter used for lists and maps.
- * @param[in, out] target The string to append the value to.
- */
- virtual util::Status AppendVariable(
- const StringPiece& variable_name,
- const client::UriTemplateConfig& config,
- string* target);
-
-
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- ChildReference* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
-
- private:
- string folder_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(ChildrenResource_InsertMethod);
-};
-
-/**
- * Implements the list method.
- *
- * @ingroup ServiceMethod
- *
- * This class uses the Command Pattern. Construct an instance with the required
- * parameters, then set any additional optional parameters by using the
- * attribute setters. To invoke the method, call Execute .
- *
- * One or more of these authorization scopes are required for this method:
- * https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
- * https://www.googleapis.com/auth/drive.readonly
- */
-class ChildrenResource_ListMethod : public DriveServiceBaseRequest {
- public:
- /**
- * The standard constructor takes all the required method parameters.
- * @param[in] _service_ The service instance to send to when executed.
- * @param[in] _credential_ If not NULL, the credential to authorize with.
- * In practice this is supplied by the user code that is
- * creating the method instance.
- * @param[in] folder_id The ID of the folder.
- */
- ChildrenResource_ListMethod(
- const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const StringPiece& folder_id);
-
- /**
- * Standard destructor.
- */
- virtual ~ChildrenResource_ListMethod();
+ /**
+ * Gets the optional 'includeCorpusRemovals ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_include_corpus_removals() const { return include_corpus_removals_; }
+ /**
+ * Sets the 'includeCorpusRemovals ' attribute.
+ *
+ * @param[in] value Whether changes should include the file resource if the
+ * file is still accessible by the user at the time of the request, even
+ * when a file was removed from the list of changes and there will be no
+ * further change entries for this file.
+ */
+ void set_include_corpus_removals(bool value) {
+ _have_include_corpus_removals_ = true;
+ include_corpus_removals_ = value;
+ }
/**
- * Clears the 'orderBy ' attribute so it is no longer set.
+ * Clears the 'includeDeleted ' attribute so it is no longer
+ * set.
*/
- void clear_order_by() {
- _have_order_by_ = false;
- client::ClearCppValueHelper(&order_by_);
+ void clear_include_deleted() {
+ _have_include_deleted_ = false;
+ client::ClearCppValueHelper(&include_deleted_);
}
/**
- * Gets the optional 'orderBy ' attribute.
+ * Gets the optional 'includeDeleted ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_order_by() const { return order_by_; }
+ bool get_include_deleted() const { return include_deleted_; }
/**
- * Gets a modifiable pointer to the optional orderBy '
- * attribute.
+ * Sets the 'includeDeleted ' attribute.
*
- * @return The value can be set by dereferencing the pointer.
+ * @param[in] value Whether to include changes indicating that items have
+ * been removed from the list of changes, for example by deletion or loss of
+ * access.
*/
- string* mutable_orderBy() {
- _have_order_by_ = true;
- return &order_by_;
+ void set_include_deleted(bool value) {
+ _have_include_deleted_ = true;
+ include_deleted_ = value;
+ }
+
+ /**
+ * Clears the 'includeSubscribed ' attribute so it is no longer
+ * set.
+ */
+ void clear_include_subscribed() {
+ _have_include_subscribed_ = false;
+ client::ClearCppValueHelper(&include_subscribed_);
}
/**
- * Sets the 'orderBy ' attribute.
+ * Gets the optional 'includeSubscribed ' attribute.
*
- * @param[in] value A comma-separated list of sort keys. Valid keys are
- * 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate',
- * 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate',
- * 'starred', and 'title'. Each key sorts ascending by default, but may be
- * reversed with the 'desc' modifier. Example usage:
- * ?orderBy=folder,modifiedDate desc,title. Please note that there is a
- * current limitation for users with approximately one million files in
- * which the requested sort order is ignored.
+ * If the value is not set then the default value will be returned.
*/
- void set_order_by(const string& value) {
- _have_order_by_ = true;
- order_by_ = value;
+ bool get_include_subscribed() const { return include_subscribed_; }
+
+ /**
+ * Sets the 'includeSubscribed ' attribute.
+ *
+ * @param[in] value Whether to include public files the user has opened and
+ * shared files. When set to false, the list only includes owned files plus
+ * any shared or public files the user has explicitly added to a folder they
+ * own.
+ */
+ void set_include_subscribed(bool value) {
+ _have_include_subscribed_ = true;
+ include_subscribed_ = value;
+ }
+
+ /**
+ * Clears the 'includeTeamDriveItems ' attribute so it is no
+ * longer set.
+ */
+ void clear_include_team_drive_items() {
+ _have_include_team_drive_items_ = false;
+ client::ClearCppValueHelper(&include_team_drive_items_);
+ }
+
+
+ /**
+ * Gets the optional 'includeTeamDriveItems ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_include_team_drive_items() const { return include_team_drive_items_; }
+
+ /**
+ * Sets the 'includeTeamDriveItems ' attribute.
+ *
+ * @param[in] value Whether Team Drive files or changes should be included
+ * in results.
+ */
+ void set_include_team_drive_items(bool value) {
+ _have_include_team_drive_items_ = true;
+ include_team_drive_items_ = value;
+ }
+
+ /**
+ * Clears the 'maxResults ' attribute so it is no longer set.
+ */
+ void clear_max_results() {
+ _have_max_results_ = false;
+ client::ClearCppValueHelper(&max_results_);
}
+ /**
+ * Gets the optional 'maxResults ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ int32 get_max_results() const { return max_results_; }
+
+ /**
+ * Sets the 'maxResults ' attribute.
+ *
+ * @param[in] value Maximum number of changes to return.
+ */
+ void set_max_results(int32 value) {
+ _have_max_results_ = true;
+ max_results_ = value;
+ }
/**
* Clears the 'pageToken ' attribute so it is no longer set.
@@ -1920,7 +1839,9 @@ class ChildrenResource_ListMethod : public DriveServiceBaseRequest {
/**
* Sets the 'pageToken ' attribute.
*
- * @param[in] value Page token for children.
+ * @param[in] value The token for continuing a previous list request on the
+ * next page. This should be set to the value of 'nextPageToken' from the
+ * previous response or to the response from the getStartPageToken method.
*/
void set_page_token(const string& value) {
_have_page_token_ = true;
@@ -1930,68 +1851,136 @@ class ChildrenResource_ListMethod : public DriveServiceBaseRequest {
/**
- * Clears the 'q ' attribute so it is no longer set.
+ * Clears the 'spaces ' attribute so it is no longer set.
*/
- void clear_q() {
- _have_q_ = false;
- client::ClearCppValueHelper(&q_);
+ void clear_spaces() {
+ _have_spaces_ = false;
+ client::ClearCppValueHelper(&spaces_);
}
/**
- * Gets the optional 'q ' attribute.
+ * Gets the optional 'spaces ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_q() const { return q_; }
+ const string& get_spaces() const { return spaces_; }
/**
- * Gets a modifiable pointer to the optional q ' attribute.
+ * Gets a modifiable pointer to the optional spaces ' attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_q() {
- _have_q_ = true;
- return &q_;
+ string* mutable_spaces() {
+ _have_spaces_ = true;
+ return &spaces_;
}
/**
- * Sets the 'q ' attribute.
+ * Sets the 'spaces ' attribute.
*
- * @param[in] value Query string for searching children.
+ * @param[in] value A comma-separated list of spaces to query. Supported
+ * values are 'drive', 'appDataFolder' and 'photos'.
*/
- void set_q(const string& value) {
- _have_q_ = true;
- q_ = value;
+ void set_spaces(const string& value) {
+ _have_spaces_ = true;
+ spaces_ = value;
}
/**
- * Clears the 'maxResults ' attribute so it is no longer set.
+ * Clears the 'startChangeId ' attribute so it is no longer set.
*/
- void clear_max_results() {
- _have_max_results_ = false;
- client::ClearCppValueHelper(&max_results_);
+ void clear_start_change_id() {
+ _have_start_change_id_ = false;
+ client::ClearCppValueHelper(&start_change_id_);
}
/**
- * Gets the optional 'maxResults ' attribute.
+ * Gets the optional 'startChangeId ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- int32 get_max_results() const { return max_results_; }
+ int64 get_start_change_id() const { return start_change_id_; }
/**
- * Sets the 'maxResults ' attribute.
+ * Sets the 'startChangeId ' attribute.
*
- * @param[in] value Maximum number of children to return.
+ * @param[in] value Change ID to start listing changes from.
*/
- void set_max_results(int32 value) {
- _have_max_results_ = true;
- max_results_ = value;
+ void set_start_change_id(int64 value) {
+ _have_start_change_id_ = true;
+ start_change_id_ = value;
+ }
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Clears the 'teamDriveId ' attribute so it is no longer set.
+ */
+ void clear_team_drive_id() {
+ _have_team_drive_id_ = false;
+ client::ClearCppValueHelper(&team_drive_id_);
+ }
+
+
+ /**
+ * Gets the optional 'teamDriveId ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_team_drive_id() const { return team_drive_id_; }
+
+ /**
+ * Gets a modifiable pointer to the optional teamDriveId '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_teamDriveId() {
+ _have_team_drive_id_ = true;
+ return &team_drive_id_;
+ }
+
+
+ /**
+ * Sets the 'teamDriveId ' attribute.
+ *
+ * @param[in] value The Team Drive from which changes will be returned. If
+ * specified the change IDs will be reflective of the Team Drive; use the
+ * combined Team Drive ID and change ID as an identifier.
+ */
+ void set_team_drive_id(const string& value) {
+ _have_team_drive_id_ = true;
+ team_drive_id_ = value;
}
/**
@@ -2027,27 +2016,79 @@ class ChildrenResource_ListMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- ChildList* data) {
+ Channel* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string folder_id_;
- string order_by_;
- string page_token_;
- string q_;
+ bool include_corpus_removals_;
+ bool include_deleted_;
+ bool include_subscribed_;
+ bool include_team_drive_items_;
int32 max_results_;
- bool _have_order_by_ : 1;
- bool _have_page_token_ : 1;
- bool _have_q_ : 1;
+ string page_token_;
+ string spaces_;
+ int64 start_change_id_;
+ bool supports_team_drives_;
+ string team_drive_id_;
+ bool _have_include_corpus_removals_ : 1;
+ bool _have_include_deleted_ : 1;
+ bool _have_include_subscribed_ : 1;
+ bool _have_include_team_drive_items_ : 1;
bool _have_max_results_ : 1;
- DISALLOW_COPY_AND_ASSIGN(ChildrenResource_ListMethod);
+ bool _have_page_token_ : 1;
+ bool _have_spaces_ : 1;
+ bool _have_start_change_id_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_team_drive_id_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(ChangesResource_WatchMethod);
};
-typedef client::ServiceRequestPager<
- ChildrenResource_ListMethod,
- ChildList>
- ChildrenResource_ListMethodPager;
+
+
+/**
+ * Implements the stop method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.apps.readonly
+ * https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
+ */
+class ChannelsResource_StopMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] _content_ The data object to stop.
+ */
+ ChannelsResource_StopMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const Channel& _content_);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~ChannelsResource_StopMethod();
+
+ private:
+ string _content_;
+ DISALLOW_COPY_AND_ASSIGN(ChannelsResource_StopMethod);
+};
@@ -2064,7 +2105,7 @@ typedef client::ServiceRequestPager<
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.file
*/
-class CommentsResource_DeleteMethod : public DriveServiceBaseRequest {
+class ChildrenResource_DeleteMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -2072,19 +2113,19 @@ class CommentsResource_DeleteMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] comment_id The ID of the comment.
+ * @param[in] folder_id The ID of the folder.
+ * @param[in] child_id The ID of the child.
*/
- CommentsResource_DeleteMethod(
+ ChildrenResource_DeleteMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& comment_id);
+ const StringPiece& folder_id,
+ const StringPiece& child_id);
/**
* Standard destructor.
*/
- virtual ~CommentsResource_DeleteMethod();
+ virtual ~ChildrenResource_DeleteMethod();
/**
@@ -2103,9 +2144,9 @@ class CommentsResource_DeleteMethod : public DriveServiceBaseRequest {
private:
- string file_id_;
- string comment_id_;
- DISALLOW_COPY_AND_ASSIGN(CommentsResource_DeleteMethod);
+ string folder_id_;
+ string child_id_;
+ DISALLOW_COPY_AND_ASSIGN(ChildrenResource_DeleteMethod);
};
/**
@@ -2119,10 +2160,14 @@ class CommentsResource_DeleteMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class CommentsResource_GetMethod : public DriveServiceBaseRequest {
+class ChildrenResource_GetMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -2130,48 +2175,20 @@ class CommentsResource_GetMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] comment_id The ID of the comment.
+ * @param[in] folder_id The ID of the folder.
+ * @param[in] child_id The ID of the child.
*/
- CommentsResource_GetMethod(
+ ChildrenResource_GetMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& comment_id);
+ const StringPiece& folder_id,
+ const StringPiece& child_id);
/**
* Standard destructor.
*/
- virtual ~CommentsResource_GetMethod();
-
-
- /**
- * Clears the 'includeDeleted ' attribute so it is no longer
- * set.
- */
- void clear_include_deleted() {
- _have_include_deleted_ = false;
- client::ClearCppValueHelper(&include_deleted_);
- }
-
-
- /**
- * Gets the optional 'includeDeleted ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_include_deleted() const { return include_deleted_; }
+ virtual ~ChildrenResource_GetMethod();
- /**
- * Sets the 'includeDeleted ' attribute.
- *
- * @param[in] value If set, this will succeed when retrieving a deleted
- * comment, and will include any deleted replies.
- */
- void set_include_deleted(bool value) {
- _have_include_deleted_ = true;
- include_deleted_ = value;
- }
/**
* Appends variable value to the target string.
@@ -2187,13 +2204,6 @@ class CommentsResource_GetMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
- /**
- * Appends the optional query parameters to the target URL.
- *
- * @param[in, out] target The URL string to append to.
- */
- virtual util::Status AppendOptionalQueryParameters(string* target);
-
/**
* Executes the method and parses the response into a data object on success.
@@ -2206,16 +2216,14 @@ class CommentsResource_GetMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Comment* data) {
+ ChildReference* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_;
- string comment_id_;
- bool include_deleted_;
- bool _have_include_deleted_ : 1;
- DISALLOW_COPY_AND_ASSIGN(CommentsResource_GetMethod);
+ string folder_id_;
+ string child_id_;
+ DISALLOW_COPY_AND_ASSIGN(ChildrenResource_GetMethod);
};
/**
@@ -2229,9 +2237,10 @@ class CommentsResource_GetMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
*/
-class CommentsResource_InsertMethod : public DriveServiceBaseRequest {
+class ChildrenResource_InsertMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -2239,20 +2248,47 @@ class CommentsResource_InsertMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
+ * @param[in] folder_id The ID of the folder.
* @param[in] _content_ The data object to insert.
*/
- CommentsResource_InsertMethod(
+ ChildrenResource_InsertMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const Comment& _content_);
+ const StringPiece& folder_id,
+ const ChildReference& _content_);
/**
* Standard destructor.
*/
- virtual ~CommentsResource_InsertMethod();
+ virtual ~ChildrenResource_InsertMethod();
+
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
/**
* Appends variable value to the target string.
@@ -2268,6 +2304,13 @@ class CommentsResource_InsertMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
/**
* Executes the method and parses the response into a data object on success.
@@ -2280,13 +2323,15 @@ class CommentsResource_InsertMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Comment* data) {
+ ChildReference* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(CommentsResource_InsertMethod);
+ string folder_id_;
+ bool supports_team_drives_;
+ bool _have_supports_team_drives_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(ChildrenResource_InsertMethod);
};
/**
@@ -2300,10 +2345,14 @@ class CommentsResource_InsertMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class CommentsResource_ListMethod : public DriveServiceBaseRequest {
+class ChildrenResource_ListMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -2311,155 +2360,167 @@ class CommentsResource_ListMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
+ * @param[in] folder_id The ID of the folder.
*/
- CommentsResource_ListMethod(
+ ChildrenResource_ListMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
+ const StringPiece& folder_id);
/**
* Standard destructor.
*/
- virtual ~CommentsResource_ListMethod();
+ virtual ~ChildrenResource_ListMethod();
/**
- * Clears the 'pageToken ' attribute so it is no longer set.
+ * Clears the 'maxResults ' attribute so it is no longer set.
*/
- void clear_page_token() {
- _have_page_token_ = false;
- client::ClearCppValueHelper(&page_token_);
+ void clear_max_results() {
+ _have_max_results_ = false;
+ client::ClearCppValueHelper(&max_results_);
}
/**
- * Gets the optional 'pageToken ' attribute.
+ * Gets the optional 'maxResults ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_page_token() const { return page_token_; }
+ int32 get_max_results() const { return max_results_; }
/**
- * Gets a modifiable pointer to the optional pageToken '
+ * Sets the 'maxResults ' attribute.
+ *
+ * @param[in] value Maximum number of children to return.
+ */
+ void set_max_results(int32 value) {
+ _have_max_results_ = true;
+ max_results_ = value;
+ }
+
+ /**
+ * Clears the 'orderBy ' attribute so it is no longer set.
+ */
+ void clear_order_by() {
+ _have_order_by_ = false;
+ client::ClearCppValueHelper(&order_by_);
+ }
+
+
+ /**
+ * Gets the optional 'orderBy ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_order_by() const { return order_by_; }
+
+ /**
+ * Gets a modifiable pointer to the optional orderBy '
* attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_pageToken() {
- _have_page_token_ = true;
- return &page_token_;
+ string* mutable_orderBy() {
+ _have_order_by_ = true;
+ return &order_by_;
}
/**
- * Sets the 'pageToken ' attribute.
+ * Sets the 'orderBy ' attribute.
*
- * @param[in] value The continuation token, used to page through large
- * result sets. To get the next page of results, set this parameter to the
- * value of "nextPageToken" from the previous response.
+ * @param[in] value A comma-separated list of sort keys. Valid keys are
+ * 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate',
+ * 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate',
+ * 'starred', and 'title'. Each key sorts ascending by default, but may be
+ * reversed with the 'desc' modifier. Example usage:
+ * ?orderBy=folder,modifiedDate desc,title. Please note that there is a
+ * current limitation for users with approximately one million files in
+ * which the requested sort order is ignored.
*/
- void set_page_token(const string& value) {
- _have_page_token_ = true;
- page_token_ = value;
+ void set_order_by(const string& value) {
+ _have_order_by_ = true;
+ order_by_ = value;
}
/**
- * Clears the 'updatedMin ' attribute so it is no longer set.
+ * Clears the 'pageToken ' attribute so it is no longer set.
*/
- void clear_updated_min() {
- _have_updated_min_ = false;
- client::ClearCppValueHelper(&updated_min_);
+ void clear_page_token() {
+ _have_page_token_ = false;
+ client::ClearCppValueHelper(&page_token_);
}
/**
- * Gets the optional 'updatedMin ' attribute.
+ * Gets the optional 'pageToken ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_updated_min() const { return updated_min_; }
+ const string& get_page_token() const { return page_token_; }
/**
- * Gets a modifiable pointer to the optional updatedMin '
+ * Gets a modifiable pointer to the optional pageToken '
* attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_updatedMin() {
- _have_updated_min_ = true;
- return &updated_min_;
+ string* mutable_pageToken() {
+ _have_page_token_ = true;
+ return &page_token_;
}
/**
- * Sets the 'updatedMin ' attribute.
+ * Sets the 'pageToken ' attribute.
*
- * @param[in] value Only discussions that were updated after this timestamp
- * will be returned. Formatted as an RFC 3339 timestamp.
+ * @param[in] value Page token for children.
*/
- void set_updated_min(const string& value) {
- _have_updated_min_ = true;
- updated_min_ = value;
+ void set_page_token(const string& value) {
+ _have_page_token_ = true;
+ page_token_ = value;
}
/**
- * Clears the 'includeDeleted ' attribute so it is no longer
- * set.
+ * Clears the 'q ' attribute so it is no longer set.
*/
- void clear_include_deleted() {
- _have_include_deleted_ = false;
- client::ClearCppValueHelper(&include_deleted_);
+ void clear_q() {
+ _have_q_ = false;
+ client::ClearCppValueHelper(&q_);
}
/**
- * Gets the optional 'includeDeleted ' attribute.
+ * Gets the optional 'q ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_include_deleted() const { return include_deleted_; }
+ const string& get_q() const { return q_; }
/**
- * Sets the 'includeDeleted ' attribute.
+ * Gets a modifiable pointer to the optional q ' attribute.
*
- * @param[in] value If set, all comments and replies, including deleted
- * comments and replies (with content stripped) will be returned.
- */
- void set_include_deleted(bool value) {
- _have_include_deleted_ = true;
- include_deleted_ = value;
- }
-
- /**
- * Clears the 'maxResults ' attribute so it is no longer set.
+ * @return The value can be set by dereferencing the pointer.
*/
- void clear_max_results() {
- _have_max_results_ = false;
- client::ClearCppValueHelper(&max_results_);
+ string* mutable_q() {
+ _have_q_ = true;
+ return &q_;
}
/**
- * Gets the optional 'maxResults ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- int32 get_max_results() const { return max_results_; }
-
- /**
- * Sets the 'maxResults ' attribute.
+ * Sets the 'q ' attribute.
*
- * @param[in] value The maximum number of discussions to include in the
- * response, used for paging.
+ * @param[in] value Query string for searching children.
*/
- void set_max_results(int32 value) {
- _have_max_results_ = true;
- max_results_ = value;
+ void set_q(const string& value) {
+ _have_q_ = true;
+ q_ = value;
}
/**
@@ -2495,30 +2556,32 @@ class CommentsResource_ListMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- CommentList* data) {
+ ChildList* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_;
- string page_token_;
- string updated_min_;
- bool include_deleted_;
+ string folder_id_;
int32 max_results_;
- bool _have_page_token_ : 1;
- bool _have_updated_min_ : 1;
- bool _have_include_deleted_ : 1;
+ string order_by_;
+ string page_token_;
+ string q_;
bool _have_max_results_ : 1;
- DISALLOW_COPY_AND_ASSIGN(CommentsResource_ListMethod);
+ bool _have_order_by_ : 1;
+ bool _have_page_token_ : 1;
+ bool _have_q_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(ChildrenResource_ListMethod);
};
typedef client::ServiceRequestPager<
- CommentsResource_ListMethod,
- CommentList>
- CommentsResource_ListMethodPager;
+ ChildrenResource_ListMethod,
+ ChildList>
+ ChildrenResource_ListMethodPager;
+
+
/**
- * Implements the patch method.
+ * Implements the delete method.
*
* @ingroup ServiceMethod
*
@@ -2530,7 +2593,7 @@ typedef client::ServiceRequestPager<
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.file
*/
-class CommentsResource_PatchMethod : public DriveServiceBaseRequest {
+class CommentsResource_DeleteMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -2540,20 +2603,104 @@ class CommentsResource_PatchMethod : public DriveServiceBaseRequest {
* creating the method instance.
* @param[in] file_id The ID of the file.
* @param[in] comment_id The ID of the comment.
- * @param[in] _content_ The data object to patch.
*/
- CommentsResource_PatchMethod(
+ CommentsResource_DeleteMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& comment_id,
- const Comment& _content_);
+ const StringPiece& comment_id);
/**
* Standard destructor.
*/
- virtual ~CommentsResource_PatchMethod();
+ virtual ~CommentsResource_DeleteMethod();
+
+
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+
+
+ private:
+ string file_id_;
+ string comment_id_;
+ DISALLOW_COPY_AND_ASSIGN(CommentsResource_DeleteMethod);
+};
+
+/**
+ * Implements the get method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.readonly
+ */
+class CommentsResource_GetMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file.
+ * @param[in] comment_id The ID of the comment.
+ */
+ CommentsResource_GetMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id,
+ const StringPiece& comment_id);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~CommentsResource_GetMethod();
+
+
+ /**
+ * Clears the 'includeDeleted ' attribute so it is no longer
+ * set.
+ */
+ void clear_include_deleted() {
+ _have_include_deleted_ = false;
+ client::ClearCppValueHelper(&include_deleted_);
+ }
+
+
+ /**
+ * Gets the optional 'includeDeleted ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_include_deleted() const { return include_deleted_; }
+ /**
+ * Sets the 'includeDeleted ' attribute.
+ *
+ * @param[in] value If set, this will succeed when retrieving a deleted
+ * comment, and will include any deleted replies.
+ */
+ void set_include_deleted(bool value) {
+ _have_include_deleted_ = true;
+ include_deleted_ = value;
+ }
/**
* Appends variable value to the target string.
@@ -2569,6 +2716,13 @@ class CommentsResource_PatchMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
/**
* Executes the method and parses the response into a data object on success.
@@ -2587,12 +2741,14 @@ class CommentsResource_PatchMethod : public DriveServiceBaseRequest {
private:
string file_id_;
- string comment_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(CommentsResource_PatchMethod);
+ string comment_id_;
+ bool include_deleted_;
+ bool _have_include_deleted_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(CommentsResource_GetMethod);
};
/**
- * Implements the update method.
+ * Implements the insert method.
*
* @ingroup ServiceMethod
*
@@ -2604,7 +2760,7 @@ class CommentsResource_PatchMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.file
*/
-class CommentsResource_UpdateMethod : public DriveServiceBaseRequest {
+class CommentsResource_InsertMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -2613,20 +2769,18 @@ class CommentsResource_UpdateMethod : public DriveServiceBaseRequest {
* In practice this is supplied by the user code that is
* creating the method instance.
* @param[in] file_id The ID of the file.
- * @param[in] comment_id The ID of the comment.
- * @param[in] _content_ The data object to update.
+ * @param[in] _content_ The data object to insert.
*/
- CommentsResource_UpdateMethod(
+ CommentsResource_InsertMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& comment_id,
const Comment& _content_);
/**
* Standard destructor.
*/
- virtual ~CommentsResource_UpdateMethod();
+ virtual ~CommentsResource_InsertMethod();
/**
@@ -2660,15 +2814,12 @@ class CommentsResource_UpdateMethod : public DriveServiceBaseRequest {
}
private:
- string file_id_;
- string comment_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(CommentsResource_UpdateMethod);
+ string file_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(CommentsResource_InsertMethod);
};
-
-
/**
- * Implements the copy method.
+ * Implements the list method.
*
* @ingroup ServiceMethod
*
@@ -2678,12 +2829,10 @@ class CommentsResource_UpdateMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.apps.readonly
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
*/
-class FilesResource_CopyMethod : public DriveServiceBaseRequest {
+class CommentsResource_ListMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -2691,262 +2840,153 @@ class FilesResource_CopyMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file to copy.
- * @param[in] _content_ The data object to copy.
+ * @param[in] file_id The ID of the file.
*/
- FilesResource_CopyMethod(
+ CommentsResource_ListMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const File& _content_);
+ const StringPiece& file_id);
/**
* Standard destructor.
*/
- virtual ~FilesResource_CopyMethod();
+ virtual ~CommentsResource_ListMethod();
/**
- * Clears the 'convert ' attribute so it is no longer set.
+ * Clears the 'includeDeleted ' attribute so it is no longer
+ * set.
*/
- void clear_convert() {
- _have_convert_ = false;
- client::ClearCppValueHelper(&convert_);
+ void clear_include_deleted() {
+ _have_include_deleted_ = false;
+ client::ClearCppValueHelper(&include_deleted_);
}
/**
- * Gets the optional 'convert ' attribute.
+ * Gets the optional 'includeDeleted ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_convert() const { return convert_; }
+ bool get_include_deleted() const { return include_deleted_; }
/**
- * Sets the 'convert ' attribute.
+ * Sets the 'includeDeleted ' attribute.
*
- * @param[in] value Whether to convert this file to the corresponding Google
- * Docs format.
+ * @param[in] value If set, all comments and replies, including deleted
+ * comments and replies (with content stripped) will be returned.
*/
- void set_convert(bool value) {
- _have_convert_ = true;
- convert_ = value;
+ void set_include_deleted(bool value) {
+ _have_include_deleted_ = true;
+ include_deleted_ = value;
}
/**
- * Clears the 'ocrLanguage ' attribute so it is no longer set.
+ * Clears the 'maxResults ' attribute so it is no longer set.
*/
- void clear_ocr_language() {
- _have_ocr_language_ = false;
- client::ClearCppValueHelper(&ocr_language_);
+ void clear_max_results() {
+ _have_max_results_ = false;
+ client::ClearCppValueHelper(&max_results_);
}
/**
- * Gets the optional 'ocrLanguage ' attribute.
+ * Gets the optional 'maxResults ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_ocr_language() const { return ocr_language_; }
-
- /**
- * Gets a modifiable pointer to the optional ocrLanguage '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_ocrLanguage() {
- _have_ocr_language_ = true;
- return &ocr_language_;
- }
-
+ int32 get_max_results() const { return max_results_; }
/**
- * Sets the 'ocrLanguage ' attribute.
+ * Sets the 'maxResults ' attribute.
*
- * @param[in] value If ocr is true, hints at the language to use. Valid
- * values are BCP 47 codes.
+ * @param[in] value The maximum number of discussions to include in the
+ * response, used for paging.
*/
- void set_ocr_language(const string& value) {
- _have_ocr_language_ = true;
- ocr_language_ = value;
+ void set_max_results(int32 value) {
+ _have_max_results_ = true;
+ max_results_ = value;
}
-
-
/**
- * Clears the 'visibility ' attribute so it is no longer set.
+ * Clears the 'pageToken ' attribute so it is no longer set.
*/
- void clear_visibility() {
- _have_visibility_ = false;
- client::ClearCppValueHelper(&visibility_);
+ void clear_page_token() {
+ _have_page_token_ = false;
+ client::ClearCppValueHelper(&page_token_);
}
/**
- * Gets the optional 'visibility ' attribute.
+ * Gets the optional 'pageToken ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_visibility() const { return visibility_; }
+ const string& get_page_token() const { return page_token_; }
/**
- * Gets a modifiable pointer to the optional visibility '
+ * Gets a modifiable pointer to the optional pageToken '
* attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_visibility() {
- _have_visibility_ = true;
- return &visibility_;
+ string* mutable_pageToken() {
+ _have_page_token_ = true;
+ return &page_token_;
}
/**
- * Sets the 'visibility ' attribute.
- *
- * @param[in] value The visibility of the new file. This parameter is only
- * relevant when the source is not a native Google Doc and convert=false.
- */
- void set_visibility(const string& value) {
- _have_visibility_ = true;
- visibility_ = value;
- }
-
-
-
- /**
- * Clears the 'pinned ' attribute so it is no longer set.
- */
- void clear_pinned() {
- _have_pinned_ = false;
- client::ClearCppValueHelper(&pinned_);
- }
-
-
- /**
- * Gets the optional 'pinned ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_pinned() const { return pinned_; }
-
- /**
- * Sets the 'pinned ' attribute.
- *
- * @param[in] value Whether to pin the head revision of the new copy. A file
- * can have a maximum of 200 pinned revisions.
- */
- void set_pinned(bool value) {
- _have_pinned_ = true;
- pinned_ = value;
- }
-
- /**
- * Clears the 'ocr ' attribute so it is no longer set.
- */
- void clear_ocr() {
- _have_ocr_ = false;
- client::ClearCppValueHelper(&ocr_);
- }
-
-
- /**
- * Gets the optional 'ocr ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_ocr() const { return ocr_; }
-
- /**
- * Sets the 'ocr ' attribute.
- *
- * @param[in] value Whether to attempt OCR on .jpg, .png, .gif, or .pdf
- * uploads.
- */
- void set_ocr(bool value) {
- _have_ocr_ = true;
- ocr_ = value;
- }
-
- /**
- * Clears the 'timedTextTrackName ' attribute so it is no longer
- * set.
- */
- void clear_timed_text_track_name() {
- _have_timed_text_track_name_ = false;
- client::ClearCppValueHelper(&timed_text_track_name_);
- }
-
-
- /**
- * Gets the optional 'timedTextTrackName ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_timed_text_track_name() const { return timed_text_track_name_; }
-
- /**
- * Gets a modifiable pointer to the optional
- * timedTextTrackName ' attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_timedTextTrackName() {
- _have_timed_text_track_name_ = true;
- return &timed_text_track_name_;
- }
-
-
- /**
- * Sets the 'timedTextTrackName ' attribute.
+ * Sets the 'pageToken ' attribute.
*
- * @param[in] value The timed text track name.
+ * @param[in] value The continuation token, used to page through large
+ * result sets. To get the next page of results, set this parameter to the
+ * value of "nextPageToken" from the previous response.
*/
- void set_timed_text_track_name(const string& value) {
- _have_timed_text_track_name_ = true;
- timed_text_track_name_ = value;
+ void set_page_token(const string& value) {
+ _have_page_token_ = true;
+ page_token_ = value;
}
/**
- * Clears the 'timedTextLanguage ' attribute so it is no longer
- * set.
+ * Clears the 'updatedMin ' attribute so it is no longer set.
*/
- void clear_timed_text_language() {
- _have_timed_text_language_ = false;
- client::ClearCppValueHelper(&timed_text_language_);
+ void clear_updated_min() {
+ _have_updated_min_ = false;
+ client::ClearCppValueHelper(&updated_min_);
}
/**
- * Gets the optional 'timedTextLanguage ' attribute.
+ * Gets the optional 'updatedMin ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_timed_text_language() const { return timed_text_language_; }
+ const string& get_updated_min() const { return updated_min_; }
/**
- * Gets a modifiable pointer to the optional timedTextLanguage '
+ * Gets a modifiable pointer to the optional updatedMin '
* attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_timedTextLanguage() {
- _have_timed_text_language_ = true;
- return &timed_text_language_;
+ string* mutable_updatedMin() {
+ _have_updated_min_ = true;
+ return &updated_min_;
}
/**
- * Sets the 'timedTextLanguage ' attribute.
+ * Sets the 'updatedMin ' attribute.
*
- * @param[in] value The language of the timed text.
+ * @param[in] value Only discussions that were updated after this timestamp
+ * will be returned. Formatted as an RFC 3339 timestamp.
*/
- void set_timed_text_language(const string& value) {
- _have_timed_text_language_ = true;
- timed_text_language_ = value;
+ void set_updated_min(const string& value) {
+ _have_updated_min_ = true;
+ updated_min_ = value;
}
/**
@@ -2982,31 +3022,30 @@ class FilesResource_CopyMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- File* data) {
+ CommentList* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- bool convert_;
- string ocr_language_;
- string visibility_;
- bool pinned_;
- bool ocr_;
- string timed_text_track_name_;
- string timed_text_language_;
- bool _have_convert_ : 1;
- bool _have_ocr_language_ : 1;
- bool _have_visibility_ : 1;
- bool _have_pinned_ : 1;
- bool _have_ocr_ : 1;
- bool _have_timed_text_track_name_ : 1;
- bool _have_timed_text_language_ : 1; string _content_;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_CopyMethod);
+ bool include_deleted_;
+ int32 max_results_;
+ string page_token_;
+ string updated_min_;
+ bool _have_include_deleted_ : 1;
+ bool _have_max_results_ : 1;
+ bool _have_page_token_ : 1;
+ bool _have_updated_min_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(CommentsResource_ListMethod);
};
+typedef client::ServiceRequestPager<
+ CommentsResource_ListMethod,
+ CommentList>
+ CommentsResource_ListMethodPager;
+
/**
- * Implements the delete method.
+ * Implements the patch method.
*
* @ingroup ServiceMethod
*
@@ -3016,10 +3055,9 @@ class FilesResource_CopyMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
*/
-class FilesResource_DeleteMethod : public DriveServiceBaseRequest {
+class CommentsResource_PatchMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -3027,17 +3065,21 @@ class FilesResource_DeleteMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file to delete.
+ * @param[in] file_id The ID of the file.
+ * @param[in] comment_id The ID of the comment.
+ * @param[in] _content_ The data object to patch.
*/
- FilesResource_DeleteMethod(
+ CommentsResource_PatchMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
+ const StringPiece& file_id,
+ const StringPiece& comment_id,
+ const Comment& _content_);
/**
* Standard destructor.
*/
- virtual ~FilesResource_DeleteMethod();
+ virtual ~CommentsResource_PatchMethod();
/**
@@ -3055,47 +3097,29 @@ class FilesResource_DeleteMethod : public DriveServiceBaseRequest {
string* target);
- private:
- string file_id_;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_DeleteMethod);
-};
-
-/**
- * Implements the emptyTrash method.
- *
- * @ingroup ServiceMethod
- *
- * This class uses the Command Pattern. Construct an instance with the required
- * parameters, then set any additional optional parameters by using the
- * attribute setters. To invoke the method, call Execute .
- *
- * One or more of these authorization scopes are required for this method:
- * https://www.googleapis.com/auth/drive
- */
-class FilesResource_EmptyTrashMethod : public DriveServiceBaseRequest {
- public:
- /**
- * The standard constructor takes all the required method parameters.
- * @param[in] _service_ The service instance to send to when executed.
- * @param[in] _credential_ If not NULL, the credential to authorize with.
- * In practice this is supplied by the user code that is
- * creating the method instance.
- */
- FilesResource_EmptyTrashMethod(
- const DriveService* _service_,
- client::AuthorizationCredential* _credential_);
-
/**
- * Standard destructor.
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
*/
- virtual ~FilesResource_EmptyTrashMethod();
+ util::Status ExecuteAndParseResponse(
+ Comment* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
private:
- DISALLOW_COPY_AND_ASSIGN(FilesResource_EmptyTrashMethod);
+ string file_id_;
+ string comment_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(CommentsResource_PatchMethod);
};
/**
- * Implements the generateIds method.
+ * Implements the update method.
*
* @ingroup ServiceMethod
*
@@ -3105,10 +3129,9 @@ class FilesResource_EmptyTrashMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
*/
-class FilesResource_GenerateIdsMethod : public DriveServiceBaseRequest {
+class CommentsResource_UpdateMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -3116,81 +3139,23 @@ class FilesResource_GenerateIdsMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
+ * @param[in] file_id The ID of the file.
+ * @param[in] comment_id The ID of the comment.
+ * @param[in] _content_ The data object to update.
*/
- FilesResource_GenerateIdsMethod(
+ CommentsResource_UpdateMethod(
const DriveService* _service_,
- client::AuthorizationCredential* _credential_);
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id,
+ const StringPiece& comment_id,
+ const Comment& _content_);
/**
* Standard destructor.
*/
- virtual ~FilesResource_GenerateIdsMethod();
+ virtual ~CommentsResource_UpdateMethod();
- /**
- * Clears the 'maxResults ' attribute so it is no longer set.
- */
- void clear_max_results() {
- _have_max_results_ = false;
- client::ClearCppValueHelper(&max_results_);
- }
-
-
- /**
- * Gets the optional 'maxResults ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- int32 get_max_results() const { return max_results_; }
-
- /**
- * Sets the 'maxResults ' attribute.
- *
- * @param[in] value Maximum number of IDs to return.
- */
- void set_max_results(int32 value) {
- _have_max_results_ = true;
- max_results_ = value;
- }
-
- /**
- * Clears the 'space ' attribute so it is no longer set.
- */
- void clear_space() {
- _have_space_ = false;
- client::ClearCppValueHelper(&space_);
- }
-
-
- /**
- * Gets the optional 'space ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_space() const { return space_; }
-
- /**
- * Gets a modifiable pointer to the optional space ' attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_space() {
- _have_space_ = true;
- return &space_;
- }
-
-
- /**
- * Sets the 'space ' attribute.
- *
- * @param[in] value The space in which the IDs can be used to create new
- * files. Supported values are 'drive' and 'appDataFolder'.
- */
- void set_space(const string& value) {
- _have_space_ = true;
- space_ = value;
- }
-
/**
* Appends variable value to the target string.
*
@@ -3205,13 +3170,6 @@ class FilesResource_GenerateIdsMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
- /**
- * Appends the optional query parameters to the target URL.
- *
- * @param[in, out] target The URL string to append to.
- */
- virtual util::Status AppendOptionalQueryParameters(string* target);
-
/**
* Executes the method and parses the response into a data object on success.
@@ -3224,20 +3182,20 @@ class FilesResource_GenerateIdsMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- GeneratedIds* data) {
+ Comment* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- int32 max_results_;
- string space_;
- bool _have_max_results_ : 1;
- bool _have_space_ : 1;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_GenerateIdsMethod);
+ string file_id_;
+ string comment_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(CommentsResource_UpdateMethod);
};
+
+
/**
- * Implements the get method.
+ * Implements the copy method.
*
* @ingroup ServiceMethod
*
@@ -3250,12 +3208,9 @@ class FilesResource_GenerateIdsMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.apps.readonly
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
* https://www.googleapis.com/auth/drive.photos.readonly
- * https://www.googleapis.com/auth/drive.readonly
*/
-class FilesResource_GetMethod : public DriveServiceBaseRequest {
+class FilesResource_CopyMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -3263,373 +3218,248 @@ class FilesResource_GetMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file in question.
+ * @param[in] file_id The ID of the file to copy.
+ * @param[in] _content_ The data object to copy.
*/
- FilesResource_GetMethod(
+ FilesResource_CopyMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
+ const StringPiece& file_id,
+ const File& _content_);
/**
* Standard destructor.
*/
- virtual ~FilesResource_GetMethod();
+ virtual ~FilesResource_CopyMethod();
/**
- * Clears the 'acknowledgeAbuse ' attribute so it is no longer
- * set.
+ * Clears the 'convert ' attribute so it is no longer set.
*/
- void clear_acknowledge_abuse() {
- _have_acknowledge_abuse_ = false;
- client::ClearCppValueHelper(&acknowledge_abuse_);
+ void clear_convert() {
+ _have_convert_ = false;
+ client::ClearCppValueHelper(&convert_);
}
/**
- * Gets the optional 'acknowledgeAbuse ' attribute.
+ * Gets the optional 'convert ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_acknowledge_abuse() const { return acknowledge_abuse_; }
+ bool get_convert() const { return convert_; }
/**
- * Sets the 'acknowledgeAbuse ' attribute.
+ * Sets the 'convert ' attribute.
*
- * @param[in] value Whether the user is acknowledging the risk of
- * downloading known malware or other abusive files.
+ * @param[in] value Whether to convert this file to the corresponding Google
+ * Docs format.
*/
- void set_acknowledge_abuse(bool value) {
- _have_acknowledge_abuse_ = true;
- acknowledge_abuse_ = value;
+ void set_convert(bool value) {
+ _have_convert_ = true;
+ convert_ = value;
}
/**
- * Clears the 'updateViewedDate ' attribute so it is no longer
- * set.
+ * Clears the 'ocr ' attribute so it is no longer set.
*/
- void clear_update_viewed_date() {
- _have_update_viewed_date_ = false;
- client::ClearCppValueHelper(&update_viewed_date_);
+ void clear_ocr() {
+ _have_ocr_ = false;
+ client::ClearCppValueHelper(&ocr_);
}
/**
- * Gets the optional 'updateViewedDate ' attribute.
+ * Gets the optional 'ocr ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_update_viewed_date() const { return update_viewed_date_; }
+ bool get_ocr() const { return ocr_; }
/**
- * Sets the 'updateViewedDate ' attribute.
- * @deprecated
+ * Sets the 'ocr ' attribute.
*
- * @param[in] value Deprecated: Use files.update with
- * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request
- * body.
+ * @param[in] value Whether to attempt OCR on .jpg, .png, .gif, or .pdf
+ * uploads.
*/
- void set_update_viewed_date(bool value) {
- _have_update_viewed_date_ = true;
- update_viewed_date_ = value;
+ void set_ocr(bool value) {
+ _have_ocr_ = true;
+ ocr_ = value;
}
/**
- * Clears the 'revisionId ' attribute so it is no longer set.
+ * Clears the 'ocrLanguage ' attribute so it is no longer set.
*/
- void clear_revision_id() {
- _have_revision_id_ = false;
- client::ClearCppValueHelper(&revision_id_);
+ void clear_ocr_language() {
+ _have_ocr_language_ = false;
+ client::ClearCppValueHelper(&ocr_language_);
}
/**
- * Gets the optional 'revisionId ' attribute.
+ * Gets the optional 'ocrLanguage ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_revision_id() const { return revision_id_; }
+ const string& get_ocr_language() const { return ocr_language_; }
/**
- * Gets a modifiable pointer to the optional revisionId '
+ * Gets a modifiable pointer to the optional ocrLanguage '
* attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_revisionId() {
- _have_revision_id_ = true;
- return &revision_id_;
+ string* mutable_ocrLanguage() {
+ _have_ocr_language_ = true;
+ return &ocr_language_;
}
/**
- * Sets the 'revisionId ' attribute.
+ * Sets the 'ocrLanguage ' attribute.
*
- * @param[in] value Specifies the Revision ID that should be downloaded.
- * Ignored unless alt=media is specified.
+ * @param[in] value If ocr is true, hints at the language to use. Valid
+ * values are BCP 47 codes.
*/
- void set_revision_id(const string& value) {
- _have_revision_id_ = true;
- revision_id_ = value;
+ void set_ocr_language(const string& value) {
+ _have_ocr_language_ = true;
+ ocr_language_ = value;
}
/**
- * Clears the 'projection ' attribute so it is no longer set.
+ * Clears the 'pinned ' attribute so it is no longer set.
*/
- void clear_projection() {
- _have_projection_ = false;
- client::ClearCppValueHelper(&projection_);
+ void clear_pinned() {
+ _have_pinned_ = false;
+ client::ClearCppValueHelper(&pinned_);
}
/**
- * Gets the optional 'projection ' attribute.
+ * Gets the optional 'pinned ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_projection() const { return projection_; }
+ bool get_pinned() const { return pinned_; }
/**
- * Gets a modifiable pointer to the optional projection '
- * attribute.
+ * Sets the 'pinned ' attribute.
*
- * @return The value can be set by dereferencing the pointer.
+ * @param[in] value Whether to pin the head revision of the new copy. A file
+ * can have a maximum of 200 pinned revisions.
*/
- string* mutable_projection() {
- _have_projection_ = true;
- return &projection_;
+ void set_pinned(bool value) {
+ _have_pinned_ = true;
+ pinned_ = value;
+ }
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
}
/**
- * Sets the 'projection ' attribute.
+ * Gets the optional 'supportsTeamDrives ' attribute.
*
- * @param[in] value This parameter is deprecated and has no function.
+ * If the value is not set then the default value will be returned.
*/
- void set_projection(const string& value) {
- _have_projection_ = true;
- projection_ = value;
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
}
- /**
- * Appends variable value to the target string.
- *
- * This is a helper function used to resolve templated variables in the URI.
- *
- * @param[in] variable_name The name of the templated variable.
- * @param[in] config A pass-through parameter used for lists and maps.
- * @param[in, out] target The string to append the value to.
- */
- virtual util::Status AppendVariable(
- const StringPiece& variable_name,
- const client::UriTemplateConfig& config,
- string* target);
+ /**
+ * Clears the 'timedTextLanguage ' attribute so it is no longer
+ * set.
+ */
+ void clear_timed_text_language() {
+ _have_timed_text_language_ = false;
+ client::ClearCppValueHelper(&timed_text_language_);
+ }
- /**
- * Appends the optional query parameters to the target URL.
- *
- * @param[in, out] target The URL string to append to.
- */
- virtual util::Status AppendOptionalQueryParameters(string* target);
-
-
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- File* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
-
- /**
- * Determine if the request should use Media Download for the response.
- *
- * @return true for media download, false otherwise.
- */
- bool get_use_media_download() const {
- return DriveServiceBaseRequest::get_use_media_download();
- }
-
- /**
- * Sets whether Media Download should be used for the response data.
- *
- * @param[in] use true to use media download, false otherwise.
- */
- void set_use_media_download(bool use) {
- DriveServiceBaseRequest::set_use_media_download(use);
- }
-
- private:
- string file_id_;
- bool acknowledge_abuse_;
- bool update_viewed_date_;
- string revision_id_;
- string projection_;
- bool _have_acknowledge_abuse_ : 1;
- bool _have_update_viewed_date_ : 1;
- bool _have_revision_id_ : 1;
- bool _have_projection_ : 1;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_GetMethod);
-};
-
-/**
- * Implements the insert method.
- *
- * @ingroup ServiceMethod
- *
- * This class uses the Command Pattern. Construct an instance with the required
- * parameters, then set any additional optional parameters by using the
- * attribute setters. To invoke the method, call Execute .
- *
- * One or more of these authorization scopes are required for this method:
- * https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.apps.readonly
- * https://www.googleapis.com/auth/drive.file
- */
-class FilesResource_InsertMethod : public DriveServiceBaseRequest {
- public:
- /**
- * The standard constructor takes all the required method parameters.
- *
- * @deprecated in favor constructor that includes the media upload parameters.
- *
- * @param[in] _service_ The service instance to send to when executed.
- * @param[in] _credential_ If not NULL, the credential to authorize with.
- * In practice this is supplied by the user code that is
- * creating the method instance.
- * @param[in] _content_ The data object to insert.
- */
- FilesResource_InsertMethod(
- const DriveService* _service_,
- client::AuthorizationCredential* _credential_);
- /**
- * The standard constructor takes all the required method parameters.
- * @param[in] _service_ The service instance to send to when executed.
- * @param[in] _credential_ If not NULL, the credential to authorize with.
- * In practice this is supplied by the user code that is
- * creating the method instance.
- * @param[in] _metadata_ The metadata object to insert. If this
- * is NULL then do not upload any metadata.
- * @param[in] _media_content_type_ The content type of the data in the
- * _media_content_reader_.
- * @param[in] _media_content_reader_ The media content to insert. If
- * this is NULL then do not upload any media and ignore
- * _media_content_type_.
- */
- FilesResource_InsertMethod(
- const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const File* _metadata_,
- const StringPiece& _media_content_type_,
- client::DataReader* _media_content_reader_);
-
- /**
- * Standard destructor.
- */
- virtual ~FilesResource_InsertMethod();
+ /**
+ * Gets the optional 'timedTextLanguage ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_timed_text_language() const { return timed_text_language_; }
/**
- * Clears the 'convert ' attribute so it is no longer set.
+ * Gets a modifiable pointer to the optional timedTextLanguage '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
*/
- void clear_convert() {
- _have_convert_ = false;
- client::ClearCppValueHelper(&convert_);
+ string* mutable_timedTextLanguage() {
+ _have_timed_text_language_ = true;
+ return &timed_text_language_;
}
/**
- * Gets the optional 'convert ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_convert() const { return convert_; }
-
- /**
- * Sets the 'convert ' attribute.
+ * Sets the 'timedTextLanguage ' attribute.
*
- * @param[in] value Whether to convert this file to the corresponding Google
- * Docs format.
- */
- void set_convert(bool value) {
- _have_convert_ = true;
- convert_ = value;
- }
-
- /**
- * Clears the 'useContentAsIndexableText ' attribute so it is no
- * longer set.
+ * @param[in] value The language of the timed text.
*/
- void clear_use_content_as_indexable_text() {
- _have_use_content_as_indexable_text_ = false;
- client::ClearCppValueHelper(&use_content_as_indexable_text_);
+ void set_timed_text_language(const string& value) {
+ _have_timed_text_language_ = true;
+ timed_text_language_ = value;
}
- /**
- * Gets the optional 'useContentAsIndexableText ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_use_content_as_indexable_text() const { return use_content_as_indexable_text_; }
-
- /**
- * Sets the 'useContentAsIndexableText ' attribute.
- *
- * @param[in] value Whether to use the content as indexable text.
- */
- void set_use_content_as_indexable_text(bool value) {
- _have_use_content_as_indexable_text_ = true;
- use_content_as_indexable_text_ = value;
- }
/**
- * Clears the 'ocrLanguage ' attribute so it is no longer set.
+ * Clears the 'timedTextTrackName ' attribute so it is no longer
+ * set.
*/
- void clear_ocr_language() {
- _have_ocr_language_ = false;
- client::ClearCppValueHelper(&ocr_language_);
+ void clear_timed_text_track_name() {
+ _have_timed_text_track_name_ = false;
+ client::ClearCppValueHelper(&timed_text_track_name_);
}
/**
- * Gets the optional 'ocrLanguage ' attribute.
+ * Gets the optional 'timedTextTrackName ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_ocr_language() const { return ocr_language_; }
+ const string& get_timed_text_track_name() const { return timed_text_track_name_; }
/**
- * Gets a modifiable pointer to the optional ocrLanguage '
- * attribute.
+ * Gets a modifiable pointer to the optional
+ * timedTextTrackName ' attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_ocrLanguage() {
- _have_ocr_language_ = true;
- return &ocr_language_;
+ string* mutable_timedTextTrackName() {
+ _have_timed_text_track_name_ = true;
+ return &timed_text_track_name_;
}
/**
- * Sets the 'ocrLanguage ' attribute.
+ * Sets the 'timedTextTrackName ' attribute.
*
- * @param[in] value If ocr is true, hints at the language to use. Valid
- * values are BCP 47 codes.
+ * @param[in] value The timed text track name.
*/
- void set_ocr_language(const string& value) {
- _have_ocr_language_ = true;
- ocr_language_ = value;
+ void set_timed_text_track_name(const string& value) {
+ _have_timed_text_track_name_ = true;
+ timed_text_track_name_ = value;
}
@@ -3666,147 +3496,131 @@ class FilesResource_InsertMethod : public DriveServiceBaseRequest {
* Sets the 'visibility ' attribute.
*
* @param[in] value The visibility of the new file. This parameter is only
- * relevant when convert=false.
+ * relevant when the source is not a native Google Doc and convert=false.
*/
void set_visibility(const string& value) {
_have_visibility_ = true;
visibility_ = value;
}
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
- /**
- * Clears the 'pinned ' attribute so it is no longer set.
- */
- void clear_pinned() {
- _have_pinned_ = false;
- client::ClearCppValueHelper(&pinned_);
- }
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ File* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
- /**
- * Gets the optional 'pinned ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_pinned() const { return pinned_; }
+ private:
+ string file_id_;
+ bool convert_;
+ bool ocr_;
+ string ocr_language_;
+ bool pinned_;
+ bool supports_team_drives_;
+ string timed_text_language_;
+ string timed_text_track_name_;
+ string visibility_;
+ bool _have_convert_ : 1;
+ bool _have_ocr_ : 1;
+ bool _have_ocr_language_ : 1;
+ bool _have_pinned_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_timed_text_language_ : 1;
+ bool _have_timed_text_track_name_ : 1;
+ bool _have_visibility_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_CopyMethod);
+};
- /**
- * Sets the 'pinned ' attribute.
- *
- * @param[in] value Whether to pin the head revision of the uploaded file. A
- * file can have a maximum of 200 pinned revisions.
- */
- void set_pinned(bool value) {
- _have_pinned_ = true;
- pinned_ = value;
- }
-
- /**
- * Clears the 'ocr ' attribute so it is no longer set.
- */
- void clear_ocr() {
- _have_ocr_ = false;
- client::ClearCppValueHelper(&ocr_);
- }
-
-
- /**
- * Gets the optional 'ocr ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_ocr() const { return ocr_; }
-
- /**
- * Sets the 'ocr ' attribute.
- *
- * @param[in] value Whether to attempt OCR on .jpg, .png, .gif, or .pdf
- * uploads.
- */
- void set_ocr(bool value) {
- _have_ocr_ = true;
- ocr_ = value;
- }
-
- /**
- * Clears the 'timedTextTrackName ' attribute so it is no longer
- * set.
- */
- void clear_timed_text_track_name() {
- _have_timed_text_track_name_ = false;
- client::ClearCppValueHelper(&timed_text_track_name_);
- }
-
-
- /**
- * Gets the optional 'timedTextTrackName ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_timed_text_track_name() const { return timed_text_track_name_; }
-
- /**
- * Gets a modifiable pointer to the optional
- * timedTextTrackName ' attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_timedTextTrackName() {
- _have_timed_text_track_name_ = true;
- return &timed_text_track_name_;
- }
-
-
- /**
- * Sets the 'timedTextTrackName ' attribute.
- *
- * @param[in] value The timed text track name.
- */
- void set_timed_text_track_name(const string& value) {
- _have_timed_text_track_name_ = true;
- timed_text_track_name_ = value;
- }
+/**
+ * Implements the delete method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.file
+ */
+class FilesResource_DeleteMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file to delete.
+ */
+ FilesResource_DeleteMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id);
+ /**
+ * Standard destructor.
+ */
+ virtual ~FilesResource_DeleteMethod();
/**
- * Clears the 'timedTextLanguage ' attribute so it is no longer
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
* set.
*/
- void clear_timed_text_language() {
- _have_timed_text_language_ = false;
- client::ClearCppValueHelper(&timed_text_language_);
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
}
/**
- * Gets the optional 'timedTextLanguage ' attribute.
+ * Gets the optional 'supportsTeamDrives ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_timed_text_language() const { return timed_text_language_; }
-
- /**
- * Gets a modifiable pointer to the optional timedTextLanguage '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_timedTextLanguage() {
- _have_timed_text_language_ = true;
- return &timed_text_language_;
- }
-
+ bool get_supports_team_drives() const { return supports_team_drives_; }
/**
- * Sets the 'timedTextLanguage ' attribute.
+ * Sets the 'supportsTeamDrives ' attribute.
*
- * @param[in] value The language of the timed text.
+ * @param[in] value Whether the requesting application supports Team Drives.
*/
- void set_timed_text_language(const string& value) {
- _have_timed_text_language_ = true;
- timed_text_language_ = value;
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
}
/**
@@ -3831,57 +3645,49 @@ class FilesResource_InsertMethod : public DriveServiceBaseRequest {
virtual util::Status AppendOptionalQueryParameters(string* target);
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- File* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
-
+ private:
+ string file_id_;
+ bool supports_team_drives_;
+ bool _have_supports_team_drives_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_DeleteMethod);
+};
+/**
+ * Implements the emptyTrash method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ */
+class FilesResource_EmptyTrashMethod : public DriveServiceBaseRequest {
+ public:
/**
- * Returns MediaUploader for uploading the content.
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
*/
+ FilesResource_EmptyTrashMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_);
/**
- * Returns the specification for media upload using the simple protocol.
- */
- static const client::MediaUploadSpec SIMPLE_MEDIA_UPLOAD;
- /**
- * Returns the specification for media upload using the resumable protocol.
+ * Standard destructor.
*/
- static const client::MediaUploadSpec RESUMABLE_MEDIA_UPLOAD;
+ virtual ~FilesResource_EmptyTrashMethod();
private:
- bool convert_;
- bool use_content_as_indexable_text_;
- string ocr_language_;
- string visibility_;
- bool pinned_;
- bool ocr_;
- string timed_text_track_name_;
- string timed_text_language_;
- bool _have_convert_ : 1;
- bool _have_use_content_as_indexable_text_ : 1;
- bool _have_ocr_language_ : 1;
- bool _have_visibility_ : 1;
- bool _have_pinned_ : 1;
- bool _have_ocr_ : 1;
- bool _have_timed_text_track_name_ : 1;
- bool _have_timed_text_language_ : 1;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_InsertMethod);
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_EmptyTrashMethod);
};
/**
- * Implements the list method.
+ * Implements the export method.
*
* @ingroup ServiceMethod
*
@@ -3891,15 +3697,10 @@ class FilesResource_InsertMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.apps.readonly
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class FilesResource_ListMethod : public DriveServiceBaseRequest {
+class FilesResource_ExportMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -3907,102 +3708,98 @@ class FilesResource_ListMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
+ * @param[in] file_id The ID of the file.
+ * @param[in] mime_type The MIME type of the format requested for this export.
*/
- FilesResource_ListMethod(
+ FilesResource_ExportMethod(
const DriveService* _service_,
- client::AuthorizationCredential* _credential_);
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id,
+ const StringPiece& mime_type);
/**
* Standard destructor.
*/
- virtual ~FilesResource_ListMethod();
-
-
- /**
- * Clears the 'orderBy ' attribute so it is no longer set.
- */
- void clear_order_by() {
- _have_order_by_ = false;
- client::ClearCppValueHelper(&order_by_);
- }
+ virtual ~FilesResource_ExportMethod();
- /**
- * Gets the optional 'orderBy ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_order_by() const { return order_by_; }
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
- /**
- * Gets a modifiable pointer to the optional orderBy '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_orderBy() {
- _have_order_by_ = true;
- return &order_by_;
- }
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
- /**
- * Sets the 'orderBy ' attribute.
- *
- * @param[in] value A comma-separated list of sort keys. Valid keys are
- * 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate',
- * 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate',
- * 'starred', and 'title'. Each key sorts ascending by default, but may be
- * reversed with the 'desc' modifier. Example usage:
- * ?orderBy=folder,modifiedDate desc,title. Please note that there is a
- * current limitation for users with approximately one million files in
- * which the requested sort order is ignored.
- */
- void set_order_by(const string& value) {
- _have_order_by_ = true;
- order_by_ = value;
- }
-
-
-
- /**
- * Clears the 'projection ' attribute so it is no longer set.
- */
- void clear_projection() {
- _have_projection_ = false;
- client::ClearCppValueHelper(&projection_);
- }
-
-
- /**
- * Gets the optional 'projection ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_projection() const { return projection_; }
+ /**
+ * Determine if the request should use Media Download for the response.
+ *
+ * @return true for media download, false otherwise.
+ */
+ bool get_use_media_download() const {
+ return DriveServiceBaseRequest::get_use_media_download();
+ }
- /**
- * Gets a modifiable pointer to the optional projection '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_projection() {
- _have_projection_ = true;
- return &projection_;
- }
+ /**
+ * Sets whether Media Download should be used for the response data.
+ *
+ * @param[in] use true to use media download, false otherwise.
+ */
+ void set_use_media_download(bool use) {
+ DriveServiceBaseRequest::set_use_media_download(use);
+ }
+ private:
+ string file_id_;
+ string mime_type_;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_ExportMethod);
+};
- /**
- * Sets the 'projection ' attribute.
- *
- * @param[in] value This parameter is deprecated and has no function.
- */
- void set_projection(const string& value) {
- _have_projection_ = true;
- projection_ = value;
- }
+/**
+ * Implements the generateIds method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.file
+ */
+class FilesResource_GenerateIdsMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ */
+ FilesResource_GenerateIdsMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_);
+ /**
+ * Standard destructor.
+ */
+ virtual ~FilesResource_GenerateIdsMethod();
/**
@@ -4024,7 +3821,7 @@ class FilesResource_ListMethod : public DriveServiceBaseRequest {
/**
* Sets the 'maxResults ' attribute.
*
- * @param[in] value Maximum number of files to return.
+ * @param[in] value Maximum number of IDs to return.
*/
void set_max_results(int32 value) {
_have_max_results_ = true;
@@ -4032,160 +3829,41 @@ class FilesResource_ListMethod : public DriveServiceBaseRequest {
}
/**
- * Clears the 'q ' attribute so it is no longer set.
- */
- void clear_q() {
- _have_q_ = false;
- client::ClearCppValueHelper(&q_);
- }
-
-
- /**
- * Gets the optional 'q ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_q() const { return q_; }
-
- /**
- * Gets a modifiable pointer to the optional q ' attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_q() {
- _have_q_ = true;
- return &q_;
- }
-
-
- /**
- * Sets the 'q ' attribute.
- *
- * @param[in] value Query string for searching files.
- */
- void set_q(const string& value) {
- _have_q_ = true;
- q_ = value;
- }
-
-
-
- /**
- * Clears the 'pageToken ' attribute so it is no longer set.
- */
- void clear_page_token() {
- _have_page_token_ = false;
- client::ClearCppValueHelper(&page_token_);
- }
-
-
- /**
- * Gets the optional 'pageToken ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_page_token() const { return page_token_; }
-
- /**
- * Gets a modifiable pointer to the optional pageToken '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_pageToken() {
- _have_page_token_ = true;
- return &page_token_;
- }
-
-
- /**
- * Sets the 'pageToken ' attribute.
- *
- * @param[in] value Page token for files.
- */
- void set_page_token(const string& value) {
- _have_page_token_ = true;
- page_token_ = value;
- }
-
-
-
- /**
- * Clears the 'spaces ' attribute so it is no longer set.
- */
- void clear_spaces() {
- _have_spaces_ = false;
- client::ClearCppValueHelper(&spaces_);
- }
-
-
- /**
- * Gets the optional 'spaces ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_spaces() const { return spaces_; }
-
- /**
- * Gets a modifiable pointer to the optional spaces ' attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_spaces() {
- _have_spaces_ = true;
- return &spaces_;
- }
-
-
- /**
- * Sets the 'spaces ' attribute.
- *
- * @param[in] value A comma-separated list of spaces to query. Supported
- * values are 'drive', 'appDataFolder' and 'photos'.
- */
- void set_spaces(const string& value) {
- _have_spaces_ = true;
- spaces_ = value;
- }
-
-
-
- /**
- * Clears the 'corpus ' attribute so it is no longer set.
+ * Clears the 'space ' attribute so it is no longer set.
*/
- void clear_corpus() {
- _have_corpus_ = false;
- client::ClearCppValueHelper(&corpus_);
+ void clear_space() {
+ _have_space_ = false;
+ client::ClearCppValueHelper(&space_);
}
/**
- * Gets the optional 'corpus ' attribute.
+ * Gets the optional 'space ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_corpus() const { return corpus_; }
+ const string& get_space() const { return space_; }
/**
- * Gets a modifiable pointer to the optional corpus ' attribute.
+ * Gets a modifiable pointer to the optional space ' attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_corpus() {
- _have_corpus_ = true;
- return &corpus_;
+ string* mutable_space() {
+ _have_space_ = true;
+ return &space_;
}
/**
- * Sets the 'corpus ' attribute.
+ * Sets the 'space ' attribute.
*
- * @param[in] value The body of items (files/documents) to which the query
- * applies.
+ * @param[in] value The space in which the IDs can be used to create new
+ * files. Supported values are 'drive' and 'appDataFolder'.
*/
- void set_corpus(const string& value) {
- _have_corpus_ = true;
- corpus_ = value;
+ void set_space(const string& value) {
+ _have_space_ = true;
+ space_ = value;
}
/**
@@ -4221,35 +3899,20 @@ class FilesResource_ListMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- FileList* data) {
+ GeneratedIds* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string order_by_;
- string projection_;
int32 max_results_;
- string q_;
- string page_token_;
- string spaces_;
- string corpus_;
- bool _have_order_by_ : 1;
- bool _have_projection_ : 1;
+ string space_;
bool _have_max_results_ : 1;
- bool _have_q_ : 1;
- bool _have_page_token_ : 1;
- bool _have_spaces_ : 1;
- bool _have_corpus_ : 1;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_ListMethod);
+ bool _have_space_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_GenerateIdsMethod);
};
-typedef client::ServiceRequestPager<
- FilesResource_ListMethod,
- FileList>
- FilesResource_ListMethodPager;
-
/**
- * Implements the patch method.
+ * Implements the get method.
*
* @ingroup ServiceMethod
*
@@ -4260,12 +3923,13 @@ typedef client::ServiceRequestPager<
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.apps.readonly
* https://www.googleapis.com/auth/drive.file
* https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.scripts
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
*/
-class FilesResource_PatchMethod : public DriveServiceBaseRequest {
+class FilesResource_GetMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -4273,233 +3937,320 @@ class FilesResource_PatchMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file to update.
- * @param[in] _content_ The data object to patch.
+ * @param[in] file_id The ID for the file in question.
*/
- FilesResource_PatchMethod(
+ FilesResource_GetMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const File& _content_);
+ const StringPiece& file_id);
/**
* Standard destructor.
*/
- virtual ~FilesResource_PatchMethod();
+ virtual ~FilesResource_GetMethod();
/**
- * Clears the 'addParents ' attribute so it is no longer set.
+ * Clears the 'acknowledgeAbuse ' attribute so it is no longer
+ * set.
*/
- void clear_add_parents() {
- _have_add_parents_ = false;
- client::ClearCppValueHelper(&add_parents_);
+ void clear_acknowledge_abuse() {
+ _have_acknowledge_abuse_ = false;
+ client::ClearCppValueHelper(&acknowledge_abuse_);
}
/**
- * Gets the optional 'addParents ' attribute.
+ * Gets the optional 'acknowledgeAbuse ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_add_parents() const { return add_parents_; }
-
- /**
- * Gets a modifiable pointer to the optional addParents '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_addParents() {
- _have_add_parents_ = true;
- return &add_parents_;
- }
-
+ bool get_acknowledge_abuse() const { return acknowledge_abuse_; }
/**
- * Sets the 'addParents ' attribute.
+ * Sets the 'acknowledgeAbuse ' attribute.
*
- * @param[in] value Comma-separated list of parent IDs to add.
+ * @param[in] value Whether the user is acknowledging the risk of
+ * downloading known malware or other abusive files.
*/
- void set_add_parents(const string& value) {
- _have_add_parents_ = true;
- add_parents_ = value;
+ void set_acknowledge_abuse(bool value) {
+ _have_acknowledge_abuse_ = true;
+ acknowledge_abuse_ = value;
}
-
-
/**
- * Clears the 'modifiedDateBehavior ' attribute so it is no
- * longer set.
+ * Clears the 'projection ' attribute so it is no longer set.
*/
- void clear_modified_date_behavior() {
- _have_modified_date_behavior_ = false;
- client::ClearCppValueHelper(&modified_date_behavior_);
+ void clear_projection() {
+ _have_projection_ = false;
+ client::ClearCppValueHelper(&projection_);
}
/**
- * Gets the optional 'modifiedDateBehavior ' attribute.
+ * Gets the optional 'projection ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_modified_date_behavior() const { return modified_date_behavior_; }
+ const string& get_projection() const { return projection_; }
/**
- * Gets a modifiable pointer to the optional
- * modifiedDateBehavior ' attribute.
+ * Gets a modifiable pointer to the optional projection '
+ * attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_modifiedDateBehavior() {
- _have_modified_date_behavior_ = true;
- return &modified_date_behavior_;
+ string* mutable_projection() {
+ _have_projection_ = true;
+ return &projection_;
}
/**
- * Sets the 'modifiedDateBehavior ' attribute.
+ * Sets the 'projection ' attribute.
*
- * @param[in] value Determines the behavior in which modifiedDate is
- * updated. This overrides setModifiedDate.
+ * @param[in] value This parameter is deprecated and has no function.
*/
- void set_modified_date_behavior(const string& value) {
- _have_modified_date_behavior_ = true;
- modified_date_behavior_ = value;
+ void set_projection(const string& value) {
+ _have_projection_ = true;
+ projection_ = value;
}
/**
- * Clears the 'removeParents ' attribute so it is no longer set.
+ * Clears the 'revisionId ' attribute so it is no longer set.
*/
- void clear_remove_parents() {
- _have_remove_parents_ = false;
- client::ClearCppValueHelper(&remove_parents_);
+ void clear_revision_id() {
+ _have_revision_id_ = false;
+ client::ClearCppValueHelper(&revision_id_);
}
/**
- * Gets the optional 'removeParents ' attribute.
+ * Gets the optional 'revisionId ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_remove_parents() const { return remove_parents_; }
+ const string& get_revision_id() const { return revision_id_; }
/**
- * Gets a modifiable pointer to the optional removeParents '
+ * Gets a modifiable pointer to the optional revisionId '
* attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_removeParents() {
- _have_remove_parents_ = true;
- return &remove_parents_;
+ string* mutable_revisionId() {
+ _have_revision_id_ = true;
+ return &revision_id_;
}
/**
- * Sets the 'removeParents ' attribute.
+ * Sets the 'revisionId ' attribute.
*
- * @param[in] value Comma-separated list of parent IDs to remove.
+ * @param[in] value Specifies the Revision ID that should be downloaded.
+ * Ignored unless alt=media is specified.
*/
- void set_remove_parents(const string& value) {
- _have_remove_parents_ = true;
- remove_parents_ = value;
+ void set_revision_id(const string& value) {
+ _have_revision_id_ = true;
+ revision_id_ = value;
}
/**
- * Clears the 'updateViewedDate ' attribute so it is no longer
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
* set.
*/
- void clear_update_viewed_date() {
- _have_update_viewed_date_ = false;
- client::ClearCppValueHelper(&update_viewed_date_);
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
}
/**
- * Gets the optional 'updateViewedDate ' attribute.
+ * Gets the optional 'supportsTeamDrives ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_update_viewed_date() const { return update_viewed_date_; }
+ bool get_supports_team_drives() const { return supports_team_drives_; }
/**
- * Sets the 'updateViewedDate ' attribute.
+ * Sets the 'supportsTeamDrives ' attribute.
*
- * @param[in] value Whether to update the view date after successfully
- * updating the file.
+ * @param[in] value Whether the requesting application supports Team Drives.
*/
- void set_update_viewed_date(bool value) {
- _have_update_viewed_date_ = true;
- update_viewed_date_ = value;
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
}
/**
- * Clears the 'setModifiedDate ' attribute so it is no longer
+ * Clears the 'updateViewedDate ' attribute so it is no longer
* set.
*/
- void clear_set_modified_date() {
- _have_set_modified_date_ = false;
- client::ClearCppValueHelper(&set_modified_date_);
+ void clear_update_viewed_date() {
+ _have_update_viewed_date_ = false;
+ client::ClearCppValueHelper(&update_viewed_date_);
}
/**
- * Gets the optional 'setModifiedDate ' attribute.
+ * Gets the optional 'updateViewedDate ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_set_modified_date() const { return set_modified_date_; }
+ bool get_update_viewed_date() const { return update_viewed_date_; }
/**
- * Sets the 'setModifiedDate ' attribute.
+ * Sets the 'updateViewedDate ' attribute.
+ * @deprecated
*
- * @param[in] value Whether to set the modified date with the supplied
- * modified date.
+ * @param[in] value Deprecated: Use files.update with
+ * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request
+ * body.
*/
- void set_set_modified_date(bool value) {
- _have_set_modified_date_ = true;
- set_modified_date_ = value;
+ void set_update_viewed_date(bool value) {
+ _have_update_viewed_date_ = true;
+ update_viewed_date_ = value;
}
- /**
- * Clears the 'useContentAsIndexableText ' attribute so it is no
- * longer set.
- */
- void clear_use_content_as_indexable_text() {
- _have_use_content_as_indexable_text_ = false;
- client::ClearCppValueHelper(&use_content_as_indexable_text_);
- }
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
- /**
- * Gets the optional 'useContentAsIndexableText ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_use_content_as_indexable_text() const { return use_content_as_indexable_text_; }
- /**
- * Sets the 'useContentAsIndexableText ' attribute.
- *
- * @param[in] value Whether to use the content as indexable text.
- */
- void set_use_content_as_indexable_text(bool value) {
- _have_use_content_as_indexable_text_ = true;
- use_content_as_indexable_text_ = value;
- }
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ File* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
- /**
- * Clears the 'convert ' attribute so it is no longer set.
- */
- void clear_convert() {
- _have_convert_ = false;
- client::ClearCppValueHelper(&convert_);
- }
+ /**
+ * Determine if the request should use Media Download for the response.
+ *
+ * @return true for media download, false otherwise.
+ */
+ bool get_use_media_download() const {
+ return DriveServiceBaseRequest::get_use_media_download();
+ }
+
+ /**
+ * Sets whether Media Download should be used for the response data.
+ *
+ * @param[in] use true to use media download, false otherwise.
+ */
+ void set_use_media_download(bool use) {
+ DriveServiceBaseRequest::set_use_media_download(use);
+ }
+
+ private:
+ string file_id_;
+ bool acknowledge_abuse_;
+ string projection_;
+ string revision_id_;
+ bool supports_team_drives_;
+ bool update_viewed_date_;
+ bool _have_acknowledge_abuse_ : 1;
+ bool _have_projection_ : 1;
+ bool _have_revision_id_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_update_viewed_date_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_GetMethod);
+};
+
+/**
+ * Implements the insert method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.apps.readonly
+ * https://www.googleapis.com/auth/drive.file
+ */
+class FilesResource_InsertMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ *
+ * @deprecated in favor constructor that includes the media upload parameters.
+ *
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] _content_ The data object to insert.
+ */
+ FilesResource_InsertMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_);
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] _metadata_ The metadata object to insert. If this
+ * is NULL then do not upload any metadata.
+ * @param[in] _media_content_type_ The content type of the data in the
+ * _media_content_reader_.
+ * @param[in] _media_content_reader_ The media content to insert. If
+ * this is NULL then do not upload any media and ignore
+ * _media_content_type_.
+ */
+ FilesResource_InsertMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const File* _metadata_,
+ const StringPiece& _media_content_type_,
+ client::DataReader* _media_content_reader_);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~FilesResource_InsertMethod();
+
+
+ /**
+ * Clears the 'convert ' attribute so it is no longer set.
+ */
+ void clear_convert() {
+ _have_convert_ = false;
+ client::ClearCppValueHelper(&convert_);
+ }
/**
@@ -4512,13 +4263,41 @@ class FilesResource_PatchMethod : public DriveServiceBaseRequest {
/**
* Sets the 'convert ' attribute.
*
- * @param[in] value This parameter is deprecated and has no function.
+ * @param[in] value Whether to convert this file to the corresponding Google
+ * Docs format.
*/
void set_convert(bool value) {
_have_convert_ = true;
convert_ = value;
}
+ /**
+ * Clears the 'ocr ' attribute so it is no longer set.
+ */
+ void clear_ocr() {
+ _have_ocr_ = false;
+ client::ClearCppValueHelper(&ocr_);
+ }
+
+
+ /**
+ * Gets the optional 'ocr ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_ocr() const { return ocr_; }
+
+ /**
+ * Sets the 'ocr ' attribute.
+ *
+ * @param[in] value Whether to attempt OCR on .jpg, .png, .gif, or .pdf
+ * uploads.
+ */
+ void set_ocr(bool value) {
+ _have_ocr_ = true;
+ ocr_ = value;
+ }
+
/**
* Clears the 'ocrLanguage ' attribute so it is no longer set.
*/
@@ -4579,8 +4358,8 @@ class FilesResource_PatchMethod : public DriveServiceBaseRequest {
/**
* Sets the 'pinned ' attribute.
*
- * @param[in] value Whether to pin the new revision. A file can have a
- * maximum of 200 pinned revisions.
+ * @param[in] value Whether to pin the head revision of the uploaded file. A
+ * file can have a maximum of 200 pinned revisions.
*/
void set_pinned(bool value) {
_have_pinned_ = true;
@@ -4588,62 +4367,30 @@ class FilesResource_PatchMethod : public DriveServiceBaseRequest {
}
/**
- * Clears the 'newRevision ' attribute so it is no longer set.
- */
- void clear_new_revision() {
- _have_new_revision_ = false;
- client::ClearCppValueHelper(&new_revision_);
- }
-
-
- /**
- * Gets the optional 'newRevision ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_new_revision() const { return new_revision_; }
-
- /**
- * Sets the 'newRevision ' attribute.
- *
- * @param[in] value Whether a blob upload should create a new revision. If
- * false, the blob data in the current head revision is replaced. If true or
- * not set, a new blob is created as head revision, and previous unpinned
- * revisions are preserved for a short period of time. Pinned revisions are
- * stored indefinitely, using additional storage quota, up to a maximum of
- * 200 revisions. For details on how revisions are retained, see the Drive
- * Help Center.
- */
- void set_new_revision(bool value) {
- _have_new_revision_ = true;
- new_revision_ = value;
- }
-
- /**
- * Clears the 'ocr ' attribute so it is no longer set.
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
*/
- void clear_ocr() {
- _have_ocr_ = false;
- client::ClearCppValueHelper(&ocr_);
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
}
/**
- * Gets the optional 'ocr ' attribute.
+ * Gets the optional 'supportsTeamDrives ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_ocr() const { return ocr_; }
+ bool get_supports_team_drives() const { return supports_team_drives_; }
/**
- * Sets the 'ocr ' attribute.
+ * Sets the 'supportsTeamDrives ' attribute.
*
- * @param[in] value Whether to attempt OCR on .jpg, .png, .gif, or .pdf
- * uploads.
+ * @param[in] value Whether the requesting application supports Team Drives.
*/
- void set_ocr(bool value) {
- _have_ocr_ = true;
- ocr_ = value;
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
}
/**
@@ -4726,6 +4473,74 @@ class FilesResource_PatchMethod : public DriveServiceBaseRequest {
timed_text_track_name_ = value;
}
+
+
+ /**
+ * Clears the 'useContentAsIndexableText ' attribute so it is no
+ * longer set.
+ */
+ void clear_use_content_as_indexable_text() {
+ _have_use_content_as_indexable_text_ = false;
+ client::ClearCppValueHelper(&use_content_as_indexable_text_);
+ }
+
+
+ /**
+ * Gets the optional 'useContentAsIndexableText ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_use_content_as_indexable_text() const { return use_content_as_indexable_text_; }
+
+ /**
+ * Sets the 'useContentAsIndexableText ' attribute.
+ *
+ * @param[in] value Whether to use the content as indexable text.
+ */
+ void set_use_content_as_indexable_text(bool value) {
+ _have_use_content_as_indexable_text_ = true;
+ use_content_as_indexable_text_ = value;
+ }
+
+ /**
+ * Clears the 'visibility ' attribute so it is no longer set.
+ */
+ void clear_visibility() {
+ _have_visibility_ = false;
+ client::ClearCppValueHelper(&visibility_);
+ }
+
+
+ /**
+ * Gets the optional 'visibility ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_visibility() const { return visibility_; }
+
+ /**
+ * Gets a modifiable pointer to the optional visibility '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_visibility() {
+ _have_visibility_ = true;
+ return &visibility_;
+ }
+
+
+ /**
+ * Sets the 'visibility ' attribute.
+ *
+ * @param[in] value The visibility of the new file. This parameter is only
+ * relevant when convert=false.
+ */
+ void set_visibility(const string& value) {
+ _have_visibility_ = true;
+ visibility_ = value;
+ }
+
/**
* Appends variable value to the target string.
*
@@ -4763,39 +4578,44 @@ class FilesResource_PatchMethod : public DriveServiceBaseRequest {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
+
+ /**
+ * Returns MediaUploader for uploading the content.
+ */
+
+ /**
+ * Returns the specification for media upload using the simple protocol.
+ */
+ static const client::MediaUploadSpec SIMPLE_MEDIA_UPLOAD;
+ /**
+ * Returns the specification for media upload using the resumable protocol.
+ */
+ static const client::MediaUploadSpec RESUMABLE_MEDIA_UPLOAD;
+
private:
- string file_id_;
- string add_parents_;
- string modified_date_behavior_;
- string remove_parents_;
- bool update_viewed_date_;
- bool set_modified_date_;
- bool use_content_as_indexable_text_;
bool convert_;
+ bool ocr_;
string ocr_language_;
bool pinned_;
- bool new_revision_;
- bool ocr_;
+ bool supports_team_drives_;
string timed_text_language_;
string timed_text_track_name_;
- bool _have_add_parents_ : 1;
- bool _have_modified_date_behavior_ : 1;
- bool _have_remove_parents_ : 1;
- bool _have_update_viewed_date_ : 1;
- bool _have_set_modified_date_ : 1;
- bool _have_use_content_as_indexable_text_ : 1;
+ bool use_content_as_indexable_text_;
+ string visibility_;
bool _have_convert_ : 1;
+ bool _have_ocr_ : 1;
bool _have_ocr_language_ : 1;
bool _have_pinned_ : 1;
- bool _have_new_revision_ : 1;
- bool _have_ocr_ : 1;
+ bool _have_supports_team_drives_ : 1;
bool _have_timed_text_language_ : 1;
- bool _have_timed_text_track_name_ : 1; string _content_;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_PatchMethod);
+ bool _have_timed_text_track_name_ : 1;
+ bool _have_use_content_as_indexable_text_ : 1;
+ bool _have_visibility_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_InsertMethod);
};
/**
- * Implements the touch method.
+ * Implements the list method.
*
* @ingroup ServiceMethod
*
@@ -4809,8 +4629,11 @@ class FilesResource_PatchMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive.apps.readonly
* https://www.googleapis.com/auth/drive.file
* https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
*/
-class FilesResource_TouchMethod : public DriveServiceBaseRequest {
+class FilesResource_ListMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -4818,215 +4641,1414 @@ class FilesResource_TouchMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file to update.
*/
- FilesResource_TouchMethod(
+ FilesResource_ListMethod(
const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
+ client::AuthorizationCredential* _credential_);
/**
* Standard destructor.
*/
- virtual ~FilesResource_TouchMethod();
+ virtual ~FilesResource_ListMethod();
- /**
- * Appends variable value to the target string.
- *
- * This is a helper function used to resolve templated variables in the URI.
- *
- * @param[in] variable_name The name of the templated variable.
- * @param[in] config A pass-through parameter used for lists and maps.
- * @param[in, out] target The string to append the value to.
- */
- virtual util::Status AppendVariable(
- const StringPiece& variable_name,
- const client::UriTemplateConfig& config,
- string* target);
+ /**
+ * Clears the 'corpora ' attribute so it is no longer set.
+ */
+ void clear_corpora() {
+ _have_corpora_ = false;
+ client::ClearCppValueHelper(&corpora_);
+ }
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- File* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
+ /**
+ * Gets the optional 'corpora ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_corpora() const { return corpora_; }
- private:
- string file_id_;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_TouchMethod);
-};
+ /**
+ * Gets a modifiable pointer to the optional corpora '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_corpora() {
+ _have_corpora_ = true;
+ return &corpora_;
+ }
-/**
- * Implements the trash method.
- *
- * @ingroup ServiceMethod
- *
- * This class uses the Command Pattern. Construct an instance with the required
- * parameters, then set any additional optional parameters by using the
- * attribute setters. To invoke the method, call Execute .
- *
- * One or more of these authorization scopes are required for this method:
- * https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.apps.readonly
- * https://www.googleapis.com/auth/drive.file
- */
-class FilesResource_TrashMethod : public DriveServiceBaseRequest {
- public:
- /**
- * The standard constructor takes all the required method parameters.
- * @param[in] _service_ The service instance to send to when executed.
- * @param[in] _credential_ If not NULL, the credential to authorize with.
- * In practice this is supplied by the user code that is
- * creating the method instance.
- * @param[in] file_id The ID of the file to trash.
- */
- FilesResource_TrashMethod(
- const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
- /**
- * Standard destructor.
- */
- virtual ~FilesResource_TrashMethod();
+ /**
+ * Sets the 'corpora ' attribute.
+ *
+ * @param[in] value Comma-separated list of bodies of items
+ * (files/documents) to which the query applies. Supported bodies are
+ * 'default', 'domain', 'teamDrive' and 'allTeamDrives'. 'allTeamDrives'
+ * must be combined with 'default'; all other values must be used in
+ * isolation. Prefer 'default' or 'teamDrive' to 'allTeamDrives' for
+ * efficiency.
+ */
+ void set_corpora(const string& value) {
+ _have_corpora_ = true;
+ corpora_ = value;
+ }
- /**
- * Appends variable value to the target string.
- *
- * This is a helper function used to resolve templated variables in the URI.
- *
- * @param[in] variable_name The name of the templated variable.
- * @param[in] config A pass-through parameter used for lists and maps.
- * @param[in, out] target The string to append the value to.
- */
- virtual util::Status AppendVariable(
- const StringPiece& variable_name,
- const client::UriTemplateConfig& config,
- string* target);
+ /**
+ * Clears the 'corpus ' attribute so it is no longer set.
+ */
+ void clear_corpus() {
+ _have_corpus_ = false;
+ client::ClearCppValueHelper(&corpus_);
+ }
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- File* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
- private:
- string file_id_;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_TrashMethod);
-};
+ /**
+ * Gets the optional 'corpus ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_corpus() const { return corpus_; }
-/**
- * Implements the untrash method.
- *
- * @ingroup ServiceMethod
- *
- * This class uses the Command Pattern. Construct an instance with the required
- * parameters, then set any additional optional parameters by using the
- * attribute setters. To invoke the method, call Execute .
- *
- * One or more of these authorization scopes are required for this method:
- * https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.apps.readonly
- * https://www.googleapis.com/auth/drive.file
- */
-class FilesResource_UntrashMethod : public DriveServiceBaseRequest {
- public:
- /**
- * The standard constructor takes all the required method parameters.
- * @param[in] _service_ The service instance to send to when executed.
- * @param[in] _credential_ If not NULL, the credential to authorize with.
- * In practice this is supplied by the user code that is
- * creating the method instance.
- * @param[in] file_id The ID of the file to untrash.
- */
- FilesResource_UntrashMethod(
- const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
+ /**
+ * Gets a modifiable pointer to the optional corpus ' attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_corpus() {
+ _have_corpus_ = true;
+ return &corpus_;
+ }
- /**
- * Standard destructor.
- */
- virtual ~FilesResource_UntrashMethod();
+ /**
+ * Sets the 'corpus ' attribute.
+ *
+ * @param[in] value The body of items (files/documents) to which the query
+ * applies. Deprecated: use 'corpora' instead.
+ */
+ void set_corpus(const string& value) {
+ _have_corpus_ = true;
+ corpus_ = value;
+ }
- /**
- * Appends variable value to the target string.
- *
- * This is a helper function used to resolve templated variables in the URI.
- *
- * @param[in] variable_name The name of the templated variable.
- * @param[in] config A pass-through parameter used for lists and maps.
- * @param[in, out] target The string to append the value to.
- */
- virtual util::Status AppendVariable(
- const StringPiece& variable_name,
- const client::UriTemplateConfig& config,
- string* target);
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- File* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
+ /**
+ * Clears the 'includeTeamDriveItems ' attribute so it is no
+ * longer set.
+ */
+ void clear_include_team_drive_items() {
+ _have_include_team_drive_items_ = false;
+ client::ClearCppValueHelper(&include_team_drive_items_);
+ }
- private:
- string file_id_;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_UntrashMethod);
-};
-/**
- * Implements the update method.
- *
- * @ingroup ServiceMethod
- *
- * This class uses the Command Pattern. Construct an instance with the required
- * parameters, then set any additional optional parameters by using the
- * attribute setters. To invoke the method, call Execute .
- *
- * One or more of these authorization scopes are required for this method:
- * https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.apps.readonly
- * https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.scripts
- */
-class FilesResource_UpdateMethod : public DriveServiceBaseRequest {
- public:
+ /**
+ * Gets the optional 'includeTeamDriveItems ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_include_team_drive_items() const { return include_team_drive_items_; }
+
+ /**
+ * Sets the 'includeTeamDriveItems ' attribute.
+ *
+ * @param[in] value Whether Team Drive items should be included in results.
+ */
+ void set_include_team_drive_items(bool value) {
+ _have_include_team_drive_items_ = true;
+ include_team_drive_items_ = value;
+ }
+
+ /**
+ * Clears the 'maxResults ' attribute so it is no longer set.
+ */
+ void clear_max_results() {
+ _have_max_results_ = false;
+ client::ClearCppValueHelper(&max_results_);
+ }
+
+
+ /**
+ * Gets the optional 'maxResults ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ int32 get_max_results() const { return max_results_; }
+
+ /**
+ * Sets the 'maxResults ' attribute.
+ *
+ * @param[in] value The maximum number of files to return per page. Partial
+ * or empty result pages are possible even before the end of the files list
+ * has been reached.
+ */
+ void set_max_results(int32 value) {
+ _have_max_results_ = true;
+ max_results_ = value;
+ }
+
+ /**
+ * Clears the 'orderBy ' attribute so it is no longer set.
+ */
+ void clear_order_by() {
+ _have_order_by_ = false;
+ client::ClearCppValueHelper(&order_by_);
+ }
+
+
+ /**
+ * Gets the optional 'orderBy ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_order_by() const { return order_by_; }
+
+ /**
+ * Gets a modifiable pointer to the optional orderBy '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_orderBy() {
+ _have_order_by_ = true;
+ return &order_by_;
+ }
+
+
+ /**
+ * Sets the 'orderBy ' attribute.
+ *
+ * @param[in] value A comma-separated list of sort keys. Valid keys are
+ * 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate',
+ * 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate',
+ * 'starred', and 'title'. Each key sorts ascending by default, but may be
+ * reversed with the 'desc' modifier. Example usage:
+ * ?orderBy=folder,modifiedDate desc,title. Please note that there is a
+ * current limitation for users with approximately one million files in
+ * which the requested sort order is ignored.
+ */
+ void set_order_by(const string& value) {
+ _have_order_by_ = true;
+ order_by_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'pageToken ' attribute so it is no longer set.
+ */
+ void clear_page_token() {
+ _have_page_token_ = false;
+ client::ClearCppValueHelper(&page_token_);
+ }
+
+
+ /**
+ * Gets the optional 'pageToken ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_page_token() const { return page_token_; }
+
+ /**
+ * Gets a modifiable pointer to the optional pageToken '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_pageToken() {
+ _have_page_token_ = true;
+ return &page_token_;
+ }
+
+
+ /**
+ * Sets the 'pageToken ' attribute.
+ *
+ * @param[in] value Page token for files.
+ */
+ void set_page_token(const string& value) {
+ _have_page_token_ = true;
+ page_token_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'projection ' attribute so it is no longer set.
+ */
+ void clear_projection() {
+ _have_projection_ = false;
+ client::ClearCppValueHelper(&projection_);
+ }
+
+
+ /**
+ * Gets the optional 'projection ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_projection() const { return projection_; }
+
+ /**
+ * Gets a modifiable pointer to the optional projection '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_projection() {
+ _have_projection_ = true;
+ return &projection_;
+ }
+
+
+ /**
+ * Sets the 'projection ' attribute.
+ *
+ * @param[in] value This parameter is deprecated and has no function.
+ */
+ void set_projection(const string& value) {
+ _have_projection_ = true;
+ projection_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'q ' attribute so it is no longer set.
+ */
+ void clear_q() {
+ _have_q_ = false;
+ client::ClearCppValueHelper(&q_);
+ }
+
+
+ /**
+ * Gets the optional 'q ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_q() const { return q_; }
+
+ /**
+ * Gets a modifiable pointer to the optional q ' attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_q() {
+ _have_q_ = true;
+ return &q_;
+ }
+
+
+ /**
+ * Sets the 'q ' attribute.
+ *
+ * @param[in] value Query string for searching files.
+ */
+ void set_q(const string& value) {
+ _have_q_ = true;
+ q_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'spaces ' attribute so it is no longer set.
+ */
+ void clear_spaces() {
+ _have_spaces_ = false;
+ client::ClearCppValueHelper(&spaces_);
+ }
+
+
+ /**
+ * Gets the optional 'spaces ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_spaces() const { return spaces_; }
+
+ /**
+ * Gets a modifiable pointer to the optional spaces ' attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_spaces() {
+ _have_spaces_ = true;
+ return &spaces_;
+ }
+
+
+ /**
+ * Sets the 'spaces ' attribute.
+ *
+ * @param[in] value A comma-separated list of spaces to query. Supported
+ * values are 'drive', 'appDataFolder' and 'photos'.
+ */
+ void set_spaces(const string& value) {
+ _have_spaces_ = true;
+ spaces_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Clears the 'teamDriveId ' attribute so it is no longer set.
+ */
+ void clear_team_drive_id() {
+ _have_team_drive_id_ = false;
+ client::ClearCppValueHelper(&team_drive_id_);
+ }
+
+
+ /**
+ * Gets the optional 'teamDriveId ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_team_drive_id() const { return team_drive_id_; }
+
+ /**
+ * Gets a modifiable pointer to the optional teamDriveId '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_teamDriveId() {
+ _have_team_drive_id_ = true;
+ return &team_drive_id_;
+ }
+
+
+ /**
+ * Sets the 'teamDriveId ' attribute.
+ *
+ * @param[in] value ID of Team Drive to search.
+ */
+ void set_team_drive_id(const string& value) {
+ _have_team_drive_id_ = true;
+ team_drive_id_ = value;
+ }
+
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ FileList* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
+ private:
+ string corpora_;
+ string corpus_;
+ bool include_team_drive_items_;
+ int32 max_results_;
+ string order_by_;
+ string page_token_;
+ string projection_;
+ string q_;
+ string spaces_;
+ bool supports_team_drives_;
+ string team_drive_id_;
+ bool _have_corpora_ : 1;
+ bool _have_corpus_ : 1;
+ bool _have_include_team_drive_items_ : 1;
+ bool _have_max_results_ : 1;
+ bool _have_order_by_ : 1;
+ bool _have_page_token_ : 1;
+ bool _have_projection_ : 1;
+ bool _have_q_ : 1;
+ bool _have_spaces_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_team_drive_id_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_ListMethod);
+};
+
+typedef client::ServiceRequestPager<
+ FilesResource_ListMethod,
+ FileList>
+ FilesResource_ListMethodPager;
+
+/**
+ * Implements the patch method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.apps.readonly
+ * https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.scripts
+ */
+class FilesResource_PatchMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file to update.
+ * @param[in] _content_ The data object to patch.
+ */
+ FilesResource_PatchMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id,
+ const File& _content_);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~FilesResource_PatchMethod();
+
+
+ /**
+ * Clears the 'addParents ' attribute so it is no longer set.
+ */
+ void clear_add_parents() {
+ _have_add_parents_ = false;
+ client::ClearCppValueHelper(&add_parents_);
+ }
+
+
+ /**
+ * Gets the optional 'addParents ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_add_parents() const { return add_parents_; }
+
+ /**
+ * Gets a modifiable pointer to the optional addParents '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_addParents() {
+ _have_add_parents_ = true;
+ return &add_parents_;
+ }
+
+
+ /**
+ * Sets the 'addParents ' attribute.
+ *
+ * @param[in] value Comma-separated list of parent IDs to add.
+ */
+ void set_add_parents(const string& value) {
+ _have_add_parents_ = true;
+ add_parents_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'convert ' attribute so it is no longer set.
+ */
+ void clear_convert() {
+ _have_convert_ = false;
+ client::ClearCppValueHelper(&convert_);
+ }
+
+
+ /**
+ * Gets the optional 'convert ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_convert() const { return convert_; }
+
+ /**
+ * Sets the 'convert ' attribute.
+ *
+ * @param[in] value This parameter is deprecated and has no function.
+ */
+ void set_convert(bool value) {
+ _have_convert_ = true;
+ convert_ = value;
+ }
+
+ /**
+ * Clears the 'modifiedDateBehavior ' attribute so it is no
+ * longer set.
+ */
+ void clear_modified_date_behavior() {
+ _have_modified_date_behavior_ = false;
+ client::ClearCppValueHelper(&modified_date_behavior_);
+ }
+
+
+ /**
+ * Gets the optional 'modifiedDateBehavior ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_modified_date_behavior() const { return modified_date_behavior_; }
+
+ /**
+ * Gets a modifiable pointer to the optional
+ * modifiedDateBehavior ' attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_modifiedDateBehavior() {
+ _have_modified_date_behavior_ = true;
+ return &modified_date_behavior_;
+ }
+
+
+ /**
+ * Sets the 'modifiedDateBehavior ' attribute.
+ *
+ * @param[in] value Determines the behavior in which modifiedDate is
+ * updated. This overrides setModifiedDate.
+ */
+ void set_modified_date_behavior(const string& value) {
+ _have_modified_date_behavior_ = true;
+ modified_date_behavior_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'newRevision ' attribute so it is no longer set.
+ */
+ void clear_new_revision() {
+ _have_new_revision_ = false;
+ client::ClearCppValueHelper(&new_revision_);
+ }
+
+
+ /**
+ * Gets the optional 'newRevision ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_new_revision() const { return new_revision_; }
+
+ /**
+ * Sets the 'newRevision ' attribute.
+ *
+ * @param[in] value Whether a blob upload should create a new revision. If
+ * false, the blob data in the current head revision is replaced. If true or
+ * not set, a new blob is created as head revision, and previous unpinned
+ * revisions are preserved for a short period of time. Pinned revisions are
+ * stored indefinitely, using additional storage quota, up to a maximum of
+ * 200 revisions. For details on how revisions are retained, see the Drive
+ * Help Center.
+ */
+ void set_new_revision(bool value) {
+ _have_new_revision_ = true;
+ new_revision_ = value;
+ }
+
+ /**
+ * Clears the 'ocr ' attribute so it is no longer set.
+ */
+ void clear_ocr() {
+ _have_ocr_ = false;
+ client::ClearCppValueHelper(&ocr_);
+ }
+
+
+ /**
+ * Gets the optional 'ocr ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_ocr() const { return ocr_; }
+
+ /**
+ * Sets the 'ocr ' attribute.
+ *
+ * @param[in] value Whether to attempt OCR on .jpg, .png, .gif, or .pdf
+ * uploads.
+ */
+ void set_ocr(bool value) {
+ _have_ocr_ = true;
+ ocr_ = value;
+ }
+
+ /**
+ * Clears the 'ocrLanguage ' attribute so it is no longer set.
+ */
+ void clear_ocr_language() {
+ _have_ocr_language_ = false;
+ client::ClearCppValueHelper(&ocr_language_);
+ }
+
+
+ /**
+ * Gets the optional 'ocrLanguage ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_ocr_language() const { return ocr_language_; }
+
+ /**
+ * Gets a modifiable pointer to the optional ocrLanguage '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_ocrLanguage() {
+ _have_ocr_language_ = true;
+ return &ocr_language_;
+ }
+
+
+ /**
+ * Sets the 'ocrLanguage ' attribute.
+ *
+ * @param[in] value If ocr is true, hints at the language to use. Valid
+ * values are BCP 47 codes.
+ */
+ void set_ocr_language(const string& value) {
+ _have_ocr_language_ = true;
+ ocr_language_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'pinned ' attribute so it is no longer set.
+ */
+ void clear_pinned() {
+ _have_pinned_ = false;
+ client::ClearCppValueHelper(&pinned_);
+ }
+
+
+ /**
+ * Gets the optional 'pinned ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_pinned() const { return pinned_; }
+
+ /**
+ * Sets the 'pinned ' attribute.
+ *
+ * @param[in] value Whether to pin the new revision. A file can have a
+ * maximum of 200 pinned revisions.
+ */
+ void set_pinned(bool value) {
+ _have_pinned_ = true;
+ pinned_ = value;
+ }
+
+ /**
+ * Clears the 'removeParents ' attribute so it is no longer set.
+ */
+ void clear_remove_parents() {
+ _have_remove_parents_ = false;
+ client::ClearCppValueHelper(&remove_parents_);
+ }
+
+
+ /**
+ * Gets the optional 'removeParents ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_remove_parents() const { return remove_parents_; }
+
+ /**
+ * Gets a modifiable pointer to the optional removeParents '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_removeParents() {
+ _have_remove_parents_ = true;
+ return &remove_parents_;
+ }
+
+
+ /**
+ * Sets the 'removeParents ' attribute.
+ *
+ * @param[in] value Comma-separated list of parent IDs to remove.
+ */
+ void set_remove_parents(const string& value) {
+ _have_remove_parents_ = true;
+ remove_parents_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'setModifiedDate ' attribute so it is no longer
+ * set.
+ */
+ void clear_set_modified_date() {
+ _have_set_modified_date_ = false;
+ client::ClearCppValueHelper(&set_modified_date_);
+ }
+
+
+ /**
+ * Gets the optional 'setModifiedDate ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_set_modified_date() const { return set_modified_date_; }
+
+ /**
+ * Sets the 'setModifiedDate ' attribute.
+ *
+ * @param[in] value Whether to set the modified date with the supplied
+ * modified date.
+ */
+ void set_set_modified_date(bool value) {
+ _have_set_modified_date_ = true;
+ set_modified_date_ = value;
+ }
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Clears the 'timedTextLanguage ' attribute so it is no longer
+ * set.
+ */
+ void clear_timed_text_language() {
+ _have_timed_text_language_ = false;
+ client::ClearCppValueHelper(&timed_text_language_);
+ }
+
+
+ /**
+ * Gets the optional 'timedTextLanguage ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_timed_text_language() const { return timed_text_language_; }
+
+ /**
+ * Gets a modifiable pointer to the optional timedTextLanguage '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_timedTextLanguage() {
+ _have_timed_text_language_ = true;
+ return &timed_text_language_;
+ }
+
+
+ /**
+ * Sets the 'timedTextLanguage ' attribute.
+ *
+ * @param[in] value The language of the timed text.
+ */
+ void set_timed_text_language(const string& value) {
+ _have_timed_text_language_ = true;
+ timed_text_language_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'timedTextTrackName ' attribute so it is no longer
+ * set.
+ */
+ void clear_timed_text_track_name() {
+ _have_timed_text_track_name_ = false;
+ client::ClearCppValueHelper(&timed_text_track_name_);
+ }
+
+
+ /**
+ * Gets the optional 'timedTextTrackName ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_timed_text_track_name() const { return timed_text_track_name_; }
+
+ /**
+ * Gets a modifiable pointer to the optional
+ * timedTextTrackName ' attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_timedTextTrackName() {
+ _have_timed_text_track_name_ = true;
+ return &timed_text_track_name_;
+ }
+
+
+ /**
+ * Sets the 'timedTextTrackName ' attribute.
+ *
+ * @param[in] value The timed text track name.
+ */
+ void set_timed_text_track_name(const string& value) {
+ _have_timed_text_track_name_ = true;
+ timed_text_track_name_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'updateViewedDate ' attribute so it is no longer
+ * set.
+ */
+ void clear_update_viewed_date() {
+ _have_update_viewed_date_ = false;
+ client::ClearCppValueHelper(&update_viewed_date_);
+ }
+
+
+ /**
+ * Gets the optional 'updateViewedDate ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_update_viewed_date() const { return update_viewed_date_; }
+
+ /**
+ * Sets the 'updateViewedDate ' attribute.
+ *
+ * @param[in] value Whether to update the view date after successfully
+ * updating the file.
+ */
+ void set_update_viewed_date(bool value) {
+ _have_update_viewed_date_ = true;
+ update_viewed_date_ = value;
+ }
+
+ /**
+ * Clears the 'useContentAsIndexableText ' attribute so it is no
+ * longer set.
+ */
+ void clear_use_content_as_indexable_text() {
+ _have_use_content_as_indexable_text_ = false;
+ client::ClearCppValueHelper(&use_content_as_indexable_text_);
+ }
+
+
+ /**
+ * Gets the optional 'useContentAsIndexableText ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_use_content_as_indexable_text() const { return use_content_as_indexable_text_; }
+
+ /**
+ * Sets the 'useContentAsIndexableText ' attribute.
+ *
+ * @param[in] value Whether to use the content as indexable text.
+ */
+ void set_use_content_as_indexable_text(bool value) {
+ _have_use_content_as_indexable_text_ = true;
+ use_content_as_indexable_text_ = value;
+ }
+
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ File* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
+ private:
+ string file_id_;
+ string add_parents_;
+ bool convert_;
+ string modified_date_behavior_;
+ bool new_revision_;
+ bool ocr_;
+ string ocr_language_;
+ bool pinned_;
+ string remove_parents_;
+ bool set_modified_date_;
+ bool supports_team_drives_;
+ string timed_text_language_;
+ string timed_text_track_name_;
+ bool update_viewed_date_;
+ bool use_content_as_indexable_text_;
+ bool _have_add_parents_ : 1;
+ bool _have_convert_ : 1;
+ bool _have_modified_date_behavior_ : 1;
+ bool _have_new_revision_ : 1;
+ bool _have_ocr_ : 1;
+ bool _have_ocr_language_ : 1;
+ bool _have_pinned_ : 1;
+ bool _have_remove_parents_ : 1;
+ bool _have_set_modified_date_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_timed_text_language_ : 1;
+ bool _have_timed_text_track_name_ : 1;
+ bool _have_update_viewed_date_ : 1;
+ bool _have_use_content_as_indexable_text_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_PatchMethod);
+};
+
+/**
+ * Implements the touch method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.apps.readonly
+ * https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ */
+class FilesResource_TouchMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file to update.
+ */
+ FilesResource_TouchMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~FilesResource_TouchMethod();
+
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ File* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
+ private:
+ string file_id_;
+ bool supports_team_drives_;
+ bool _have_supports_team_drives_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_TouchMethod);
+};
+
+/**
+ * Implements the trash method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.apps.readonly
+ * https://www.googleapis.com/auth/drive.file
+ */
+class FilesResource_TrashMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file to trash.
+ */
+ FilesResource_TrashMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~FilesResource_TrashMethod();
+
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ File* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
+ private:
+ string file_id_;
+ bool supports_team_drives_;
+ bool _have_supports_team_drives_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_TrashMethod);
+};
+
+/**
+ * Implements the untrash method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.apps.readonly
+ * https://www.googleapis.com/auth/drive.file
+ */
+class FilesResource_UntrashMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file to untrash.
+ */
+ FilesResource_UntrashMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~FilesResource_UntrashMethod();
+
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ File* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
+ private:
+ string file_id_;
+ bool supports_team_drives_;
+ bool _have_supports_team_drives_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_UntrashMethod);
+};
+
+/**
+ * Implements the update method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.apps.readonly
+ * https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.scripts
+ */
+class FilesResource_UpdateMethod : public DriveServiceBaseRequest {
+ public:
/**
* The standard constructor takes all the required method parameters.
*
@@ -5067,130 +6089,420 @@ class FilesResource_UpdateMethod : public DriveServiceBaseRequest {
const StringPiece& _media_content_type_,
client::DataReader* _media_content_reader_);
- /**
- * Standard destructor.
- */
- virtual ~FilesResource_UpdateMethod();
+ /**
+ * Standard destructor.
+ */
+ virtual ~FilesResource_UpdateMethod();
+
+
+ /**
+ * Clears the 'addParents ' attribute so it is no longer set.
+ */
+ void clear_add_parents() {
+ _have_add_parents_ = false;
+ client::ClearCppValueHelper(&add_parents_);
+ }
+
+
+ /**
+ * Gets the optional 'addParents ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_add_parents() const { return add_parents_; }
+
+ /**
+ * Gets a modifiable pointer to the optional addParents '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_addParents() {
+ _have_add_parents_ = true;
+ return &add_parents_;
+ }
+
+
+ /**
+ * Sets the 'addParents ' attribute.
+ *
+ * @param[in] value Comma-separated list of parent IDs to add.
+ */
+ void set_add_parents(const string& value) {
+ _have_add_parents_ = true;
+ add_parents_ = value;
+ }
+
/**
- * Clears the 'addParents ' attribute so it is no longer set.
+ * Clears the 'convert ' attribute so it is no longer set.
*/
- void clear_add_parents() {
- _have_add_parents_ = false;
- client::ClearCppValueHelper(&add_parents_);
+ void clear_convert() {
+ _have_convert_ = false;
+ client::ClearCppValueHelper(&convert_);
+ }
+
+
+ /**
+ * Gets the optional 'convert ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_convert() const { return convert_; }
+
+ /**
+ * Sets the 'convert ' attribute.
+ *
+ * @param[in] value This parameter is deprecated and has no function.
+ */
+ void set_convert(bool value) {
+ _have_convert_ = true;
+ convert_ = value;
+ }
+
+ /**
+ * Clears the 'modifiedDateBehavior ' attribute so it is no
+ * longer set.
+ */
+ void clear_modified_date_behavior() {
+ _have_modified_date_behavior_ = false;
+ client::ClearCppValueHelper(&modified_date_behavior_);
+ }
+
+
+ /**
+ * Gets the optional 'modifiedDateBehavior ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_modified_date_behavior() const { return modified_date_behavior_; }
+
+ /**
+ * Gets a modifiable pointer to the optional
+ * modifiedDateBehavior ' attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_modifiedDateBehavior() {
+ _have_modified_date_behavior_ = true;
+ return &modified_date_behavior_;
+ }
+
+
+ /**
+ * Sets the 'modifiedDateBehavior ' attribute.
+ *
+ * @param[in] value Determines the behavior in which modifiedDate is
+ * updated. This overrides setModifiedDate.
+ */
+ void set_modified_date_behavior(const string& value) {
+ _have_modified_date_behavior_ = true;
+ modified_date_behavior_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'newRevision ' attribute so it is no longer set.
+ */
+ void clear_new_revision() {
+ _have_new_revision_ = false;
+ client::ClearCppValueHelper(&new_revision_);
+ }
+
+
+ /**
+ * Gets the optional 'newRevision ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_new_revision() const { return new_revision_; }
+
+ /**
+ * Sets the 'newRevision ' attribute.
+ *
+ * @param[in] value Whether a blob upload should create a new revision. If
+ * false, the blob data in the current head revision is replaced. If true or
+ * not set, a new blob is created as head revision, and previous unpinned
+ * revisions are preserved for a short period of time. Pinned revisions are
+ * stored indefinitely, using additional storage quota, up to a maximum of
+ * 200 revisions. For details on how revisions are retained, see the Drive
+ * Help Center.
+ */
+ void set_new_revision(bool value) {
+ _have_new_revision_ = true;
+ new_revision_ = value;
+ }
+
+ /**
+ * Clears the 'ocr ' attribute so it is no longer set.
+ */
+ void clear_ocr() {
+ _have_ocr_ = false;
+ client::ClearCppValueHelper(&ocr_);
+ }
+
+
+ /**
+ * Gets the optional 'ocr ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_ocr() const { return ocr_; }
+
+ /**
+ * Sets the 'ocr ' attribute.
+ *
+ * @param[in] value Whether to attempt OCR on .jpg, .png, .gif, or .pdf
+ * uploads.
+ */
+ void set_ocr(bool value) {
+ _have_ocr_ = true;
+ ocr_ = value;
+ }
+
+ /**
+ * Clears the 'ocrLanguage ' attribute so it is no longer set.
+ */
+ void clear_ocr_language() {
+ _have_ocr_language_ = false;
+ client::ClearCppValueHelper(&ocr_language_);
+ }
+
+
+ /**
+ * Gets the optional 'ocrLanguage ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_ocr_language() const { return ocr_language_; }
+
+ /**
+ * Gets a modifiable pointer to the optional ocrLanguage '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_ocrLanguage() {
+ _have_ocr_language_ = true;
+ return &ocr_language_;
+ }
+
+
+ /**
+ * Sets the 'ocrLanguage ' attribute.
+ *
+ * @param[in] value If ocr is true, hints at the language to use. Valid
+ * values are BCP 47 codes.
+ */
+ void set_ocr_language(const string& value) {
+ _have_ocr_language_ = true;
+ ocr_language_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'pinned ' attribute so it is no longer set.
+ */
+ void clear_pinned() {
+ _have_pinned_ = false;
+ client::ClearCppValueHelper(&pinned_);
+ }
+
+
+ /**
+ * Gets the optional 'pinned ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_pinned() const { return pinned_; }
+
+ /**
+ * Sets the 'pinned ' attribute.
+ *
+ * @param[in] value Whether to pin the new revision. A file can have a
+ * maximum of 200 pinned revisions.
+ */
+ void set_pinned(bool value) {
+ _have_pinned_ = true;
+ pinned_ = value;
+ }
+
+ /**
+ * Clears the 'removeParents ' attribute so it is no longer set.
+ */
+ void clear_remove_parents() {
+ _have_remove_parents_ = false;
+ client::ClearCppValueHelper(&remove_parents_);
+ }
+
+
+ /**
+ * Gets the optional 'removeParents ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_remove_parents() const { return remove_parents_; }
+
+ /**
+ * Gets a modifiable pointer to the optional removeParents '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_removeParents() {
+ _have_remove_parents_ = true;
+ return &remove_parents_;
+ }
+
+
+ /**
+ * Sets the 'removeParents ' attribute.
+ *
+ * @param[in] value Comma-separated list of parent IDs to remove.
+ */
+ void set_remove_parents(const string& value) {
+ _have_remove_parents_ = true;
+ remove_parents_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'setModifiedDate ' attribute so it is no longer
+ * set.
+ */
+ void clear_set_modified_date() {
+ _have_set_modified_date_ = false;
+ client::ClearCppValueHelper(&set_modified_date_);
}
/**
- * Gets the optional 'addParents ' attribute.
+ * Gets the optional 'setModifiedDate ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_add_parents() const { return add_parents_; }
+ bool get_set_modified_date() const { return set_modified_date_; }
/**
- * Gets a modifiable pointer to the optional addParents '
- * attribute.
+ * Sets the 'setModifiedDate ' attribute.
*
- * @return The value can be set by dereferencing the pointer.
+ * @param[in] value Whether to set the modified date with the supplied
+ * modified date.
*/
- string* mutable_addParents() {
- _have_add_parents_ = true;
- return &add_parents_;
+ void set_set_modified_date(bool value) {
+ _have_set_modified_date_ = true;
+ set_modified_date_ = value;
}
-
/**
- * Sets the 'addParents ' attribute.
- *
- * @param[in] value Comma-separated list of parent IDs to add.
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
*/
- void set_add_parents(const string& value) {
- _have_add_parents_ = true;
- add_parents_ = value;
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
}
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
/**
- * Clears the 'modifiedDateBehavior ' attribute so it is no
- * longer set.
+ * Clears the 'timedTextLanguage ' attribute so it is no longer
+ * set.
*/
- void clear_modified_date_behavior() {
- _have_modified_date_behavior_ = false;
- client::ClearCppValueHelper(&modified_date_behavior_);
+ void clear_timed_text_language() {
+ _have_timed_text_language_ = false;
+ client::ClearCppValueHelper(&timed_text_language_);
}
/**
- * Gets the optional 'modifiedDateBehavior ' attribute.
+ * Gets the optional 'timedTextLanguage ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_modified_date_behavior() const { return modified_date_behavior_; }
+ const string& get_timed_text_language() const { return timed_text_language_; }
/**
- * Gets a modifiable pointer to the optional
- * modifiedDateBehavior ' attribute.
+ * Gets a modifiable pointer to the optional timedTextLanguage '
+ * attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_modifiedDateBehavior() {
- _have_modified_date_behavior_ = true;
- return &modified_date_behavior_;
+ string* mutable_timedTextLanguage() {
+ _have_timed_text_language_ = true;
+ return &timed_text_language_;
}
/**
- * Sets the 'modifiedDateBehavior ' attribute.
+ * Sets the 'timedTextLanguage ' attribute.
*
- * @param[in] value Determines the behavior in which modifiedDate is
- * updated. This overrides setModifiedDate.
+ * @param[in] value The language of the timed text.
*/
- void set_modified_date_behavior(const string& value) {
- _have_modified_date_behavior_ = true;
- modified_date_behavior_ = value;
+ void set_timed_text_language(const string& value) {
+ _have_timed_text_language_ = true;
+ timed_text_language_ = value;
}
/**
- * Clears the 'removeParents ' attribute so it is no longer set.
+ * Clears the 'timedTextTrackName ' attribute so it is no longer
+ * set.
*/
- void clear_remove_parents() {
- _have_remove_parents_ = false;
- client::ClearCppValueHelper(&remove_parents_);
+ void clear_timed_text_track_name() {
+ _have_timed_text_track_name_ = false;
+ client::ClearCppValueHelper(&timed_text_track_name_);
}
/**
- * Gets the optional 'removeParents ' attribute.
+ * Gets the optional 'timedTextTrackName ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_remove_parents() const { return remove_parents_; }
+ const string& get_timed_text_track_name() const { return timed_text_track_name_; }
/**
- * Gets a modifiable pointer to the optional removeParents '
- * attribute.
+ * Gets a modifiable pointer to the optional
+ * timedTextTrackName ' attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_removeParents() {
- _have_remove_parents_ = true;
- return &remove_parents_;
+ string* mutable_timedTextTrackName() {
+ _have_timed_text_track_name_ = true;
+ return &timed_text_track_name_;
}
/**
- * Sets the 'removeParents ' attribute.
+ * Sets the 'timedTextTrackName ' attribute.
*
- * @param[in] value Comma-separated list of parent IDs to remove.
+ * @param[in] value The timed text track name.
*/
- void set_remove_parents(const string& value) {
- _have_remove_parents_ = true;
- remove_parents_ = value;
+ void set_timed_text_track_name(const string& value) {
+ _have_timed_text_track_name_ = true;
+ timed_text_track_name_ = value;
}
@@ -5224,291 +6536,591 @@ class FilesResource_UpdateMethod : public DriveServiceBaseRequest {
}
/**
- * Clears the 'setModifiedDate ' attribute so it is no longer
- * set.
+ * Clears the 'useContentAsIndexableText ' attribute so it is no
+ * longer set.
*/
- void clear_set_modified_date() {
- _have_set_modified_date_ = false;
- client::ClearCppValueHelper(&set_modified_date_);
+ void clear_use_content_as_indexable_text() {
+ _have_use_content_as_indexable_text_ = false;
+ client::ClearCppValueHelper(&use_content_as_indexable_text_);
}
/**
- * Gets the optional 'setModifiedDate ' attribute.
+ * Gets the optional 'useContentAsIndexableText ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_set_modified_date() const { return set_modified_date_; }
+ bool get_use_content_as_indexable_text() const { return use_content_as_indexable_text_; }
/**
- * Sets the 'setModifiedDate ' attribute.
+ * Sets the 'useContentAsIndexableText ' attribute.
*
- * @param[in] value Whether to set the modified date with the supplied
- * modified date.
+ * @param[in] value Whether to use the content as indexable text.
*/
- void set_set_modified_date(bool value) {
- _have_set_modified_date_ = true;
- set_modified_date_ = value;
+ void set_use_content_as_indexable_text(bool value) {
+ _have_use_content_as_indexable_text_ = true;
+ use_content_as_indexable_text_ = value;
}
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ File* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
+
+ /**
+ * Returns MediaUploader for uploading the content.
+ */
+
+ /**
+ * Returns the specification for media upload using the simple protocol.
+ */
+ static const client::MediaUploadSpec SIMPLE_MEDIA_UPLOAD;
+ /**
+ * Returns the specification for media upload using the resumable protocol.
+ */
+ static const client::MediaUploadSpec RESUMABLE_MEDIA_UPLOAD;
+
+ private:
+ string file_id_;
+ string add_parents_;
+ bool convert_;
+ string modified_date_behavior_;
+ bool new_revision_;
+ bool ocr_;
+ string ocr_language_;
+ bool pinned_;
+ string remove_parents_;
+ bool set_modified_date_;
+ bool supports_team_drives_;
+ string timed_text_language_;
+ string timed_text_track_name_;
+ bool update_viewed_date_;
+ bool use_content_as_indexable_text_;
+ bool _have_add_parents_ : 1;
+ bool _have_convert_ : 1;
+ bool _have_modified_date_behavior_ : 1;
+ bool _have_new_revision_ : 1;
+ bool _have_ocr_ : 1;
+ bool _have_ocr_language_ : 1;
+ bool _have_pinned_ : 1;
+ bool _have_remove_parents_ : 1;
+ bool _have_set_modified_date_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_timed_text_language_ : 1;
+ bool _have_timed_text_track_name_ : 1;
+ bool _have_update_viewed_date_ : 1;
+ bool _have_use_content_as_indexable_text_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_UpdateMethod);
+};
+
+/**
+ * Implements the watch method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
+ */
+class FilesResource_WatchMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID for the file in question.
+ * @param[in] _content_ The data object to watch.
+ */
+ FilesResource_WatchMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id,
+ const Channel& _content_);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~FilesResource_WatchMethod();
+
+
/**
- * Clears the 'useContentAsIndexableText ' attribute so it is no
- * longer set.
+ * Clears the 'acknowledgeAbuse ' attribute so it is no longer
+ * set.
*/
- void clear_use_content_as_indexable_text() {
- _have_use_content_as_indexable_text_ = false;
- client::ClearCppValueHelper(&use_content_as_indexable_text_);
+ void clear_acknowledge_abuse() {
+ _have_acknowledge_abuse_ = false;
+ client::ClearCppValueHelper(&acknowledge_abuse_);
}
/**
- * Gets the optional 'useContentAsIndexableText ' attribute.
+ * Gets the optional 'acknowledgeAbuse ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_use_content_as_indexable_text() const { return use_content_as_indexable_text_; }
+ bool get_acknowledge_abuse() const { return acknowledge_abuse_; }
/**
- * Sets the 'useContentAsIndexableText ' attribute.
+ * Sets the 'acknowledgeAbuse ' attribute.
*
- * @param[in] value Whether to use the content as indexable text.
+ * @param[in] value Whether the user is acknowledging the risk of
+ * downloading known malware or other abusive files.
*/
- void set_use_content_as_indexable_text(bool value) {
- _have_use_content_as_indexable_text_ = true;
- use_content_as_indexable_text_ = value;
+ void set_acknowledge_abuse(bool value) {
+ _have_acknowledge_abuse_ = true;
+ acknowledge_abuse_ = value;
}
/**
- * Clears the 'convert ' attribute so it is no longer set.
+ * Clears the 'projection ' attribute so it is no longer set.
*/
- void clear_convert() {
- _have_convert_ = false;
- client::ClearCppValueHelper(&convert_);
+ void clear_projection() {
+ _have_projection_ = false;
+ client::ClearCppValueHelper(&projection_);
}
/**
- * Gets the optional 'convert ' attribute.
+ * Gets the optional 'projection ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_convert() const { return convert_; }
+ const string& get_projection() const { return projection_; }
/**
- * Sets the 'convert ' attribute.
+ * Gets a modifiable pointer to the optional projection '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_projection() {
+ _have_projection_ = true;
+ return &projection_;
+ }
+
+
+ /**
+ * Sets the 'projection ' attribute.
*
* @param[in] value This parameter is deprecated and has no function.
*/
- void set_convert(bool value) {
- _have_convert_ = true;
- convert_ = value;
+ void set_projection(const string& value) {
+ _have_projection_ = true;
+ projection_ = value;
}
+
+
/**
- * Clears the 'ocrLanguage ' attribute so it is no longer set.
+ * Clears the 'revisionId ' attribute so it is no longer set.
*/
- void clear_ocr_language() {
- _have_ocr_language_ = false;
- client::ClearCppValueHelper(&ocr_language_);
+ void clear_revision_id() {
+ _have_revision_id_ = false;
+ client::ClearCppValueHelper(&revision_id_);
}
/**
- * Gets the optional 'ocrLanguage ' attribute.
+ * Gets the optional 'revisionId ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_ocr_language() const { return ocr_language_; }
+ const string& get_revision_id() const { return revision_id_; }
/**
- * Gets a modifiable pointer to the optional ocrLanguage '
+ * Gets a modifiable pointer to the optional revisionId '
* attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_ocrLanguage() {
- _have_ocr_language_ = true;
- return &ocr_language_;
+ string* mutable_revisionId() {
+ _have_revision_id_ = true;
+ return &revision_id_;
}
/**
- * Sets the 'ocrLanguage ' attribute.
+ * Sets the 'revisionId ' attribute.
*
- * @param[in] value If ocr is true, hints at the language to use. Valid
- * values are BCP 47 codes.
+ * @param[in] value Specifies the Revision ID that should be downloaded.
+ * Ignored unless alt=media is specified.
*/
- void set_ocr_language(const string& value) {
- _have_ocr_language_ = true;
- ocr_language_ = value;
+ void set_revision_id(const string& value) {
+ _have_revision_id_ = true;
+ revision_id_ = value;
}
/**
- * Clears the 'pinned ' attribute so it is no longer set.
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
*/
- void clear_pinned() {
- _have_pinned_ = false;
- client::ClearCppValueHelper(&pinned_);
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
}
/**
- * Gets the optional 'pinned ' attribute.
+ * Gets the optional 'supportsTeamDrives ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_pinned() const { return pinned_; }
+ bool get_supports_team_drives() const { return supports_team_drives_; }
/**
- * Sets the 'pinned ' attribute.
+ * Sets the 'supportsTeamDrives ' attribute.
*
- * @param[in] value Whether to pin the new revision. A file can have a
- * maximum of 200 pinned revisions.
+ * @param[in] value Whether the requesting application supports Team Drives.
*/
- void set_pinned(bool value) {
- _have_pinned_ = true;
- pinned_ = value;
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
}
/**
- * Clears the 'newRevision ' attribute so it is no longer set.
+ * Clears the 'updateViewedDate ' attribute so it is no longer
+ * set.
*/
- void clear_new_revision() {
- _have_new_revision_ = false;
- client::ClearCppValueHelper(&new_revision_);
+ void clear_update_viewed_date() {
+ _have_update_viewed_date_ = false;
+ client::ClearCppValueHelper(&update_viewed_date_);
}
/**
- * Gets the optional 'newRevision ' attribute.
+ * Gets the optional 'updateViewedDate ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_new_revision() const { return new_revision_; }
+ bool get_update_viewed_date() const { return update_viewed_date_; }
/**
- * Sets the 'newRevision ' attribute.
+ * Sets the 'updateViewedDate ' attribute.
+ * @deprecated
*
- * @param[in] value Whether a blob upload should create a new revision. If
- * false, the blob data in the current head revision is replaced. If true or
- * not set, a new blob is created as head revision, and previous unpinned
- * revisions are preserved for a short period of time. Pinned revisions are
- * stored indefinitely, using additional storage quota, up to a maximum of
- * 200 revisions. For details on how revisions are retained, see the Drive
- * Help Center.
+ * @param[in] value Deprecated: Use files.update with
+ * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request
+ * body.
*/
- void set_new_revision(bool value) {
- _have_new_revision_ = true;
- new_revision_ = value;
+ void set_update_viewed_date(bool value) {
+ _have_update_viewed_date_ = true;
+ update_viewed_date_ = value;
}
- /**
- * Clears the 'ocr ' attribute so it is no longer set.
- */
- void clear_ocr() {
- _have_ocr_ = false;
- client::ClearCppValueHelper(&ocr_);
- }
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ Channel* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
+ /**
+ * Determine if the request should use Media Download for the response.
+ *
+ * @return true for media download, false otherwise.
+ */
+ bool get_use_media_download() const {
+ return DriveServiceBaseRequest::get_use_media_download();
+ }
+
+ /**
+ * Sets whether Media Download should be used for the response data.
+ *
+ * @param[in] use true to use media download, false otherwise.
+ */
+ void set_use_media_download(bool use) {
+ DriveServiceBaseRequest::set_use_media_download(use);
+ }
+
+ private:
+ string file_id_;
+ bool acknowledge_abuse_;
+ string projection_;
+ string revision_id_;
+ bool supports_team_drives_;
+ bool update_viewed_date_;
+ bool _have_acknowledge_abuse_ : 1;
+ bool _have_projection_ : 1;
+ bool _have_revision_id_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_update_viewed_date_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(FilesResource_WatchMethod);
+};
+
+
+
+/**
+ * Implements the delete method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.file
+ */
+class ParentsResource_DeleteMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file.
+ * @param[in] parent_id The ID of the parent.
+ */
+ ParentsResource_DeleteMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id,
+ const StringPiece& parent_id);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~ParentsResource_DeleteMethod();
+
+
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
- /**
- * Gets the optional 'ocr ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_ocr() const { return ocr_; }
+ private:
+ string file_id_;
+ string parent_id_;
+ DISALLOW_COPY_AND_ASSIGN(ParentsResource_DeleteMethod);
+};
- /**
- * Sets the 'ocr ' attribute.
- *
- * @param[in] value Whether to attempt OCR on .jpg, .png, .gif, or .pdf
- * uploads.
- */
- void set_ocr(bool value) {
- _have_ocr_ = true;
- ocr_ = value;
- }
+/**
+ * Implements the get method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
+ */
+class ParentsResource_GetMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file.
+ * @param[in] parent_id The ID of the parent.
+ */
+ ParentsResource_GetMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id,
+ const StringPiece& parent_id);
- /**
- * Clears the 'timedTextLanguage ' attribute so it is no longer
- * set.
- */
- void clear_timed_text_language() {
- _have_timed_text_language_ = false;
- client::ClearCppValueHelper(&timed_text_language_);
- }
+ /**
+ * Standard destructor.
+ */
+ virtual ~ParentsResource_GetMethod();
- /**
- * Gets the optional 'timedTextLanguage ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_timed_text_language() const { return timed_text_language_; }
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
- /**
- * Gets a modifiable pointer to the optional timedTextLanguage '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_timedTextLanguage() {
- _have_timed_text_language_ = true;
- return &timed_text_language_;
- }
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ ParentReference* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
+ private:
+ string file_id_;
+ string parent_id_;
+ DISALLOW_COPY_AND_ASSIGN(ParentsResource_GetMethod);
+};
- /**
- * Sets the 'timedTextLanguage ' attribute.
- *
- * @param[in] value The language of the timed text.
- */
- void set_timed_text_language(const string& value) {
- _have_timed_text_language_ = true;
- timed_text_language_ = value;
- }
+/**
+ * Implements the insert method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.file
+ */
+class ParentsResource_InsertMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file.
+ * @param[in] _content_ The data object to insert.
+ */
+ ParentsResource_InsertMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id,
+ const ParentReference& _content_);
+ /**
+ * Standard destructor.
+ */
+ virtual ~ParentsResource_InsertMethod();
/**
- * Clears the 'timedTextTrackName ' attribute so it is no longer
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
* set.
*/
- void clear_timed_text_track_name() {
- _have_timed_text_track_name_ = false;
- client::ClearCppValueHelper(&timed_text_track_name_);
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
}
/**
- * Gets the optional 'timedTextTrackName ' attribute.
+ * Gets the optional 'supportsTeamDrives ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_timed_text_track_name() const { return timed_text_track_name_; }
-
- /**
- * Gets a modifiable pointer to the optional
- * timedTextTrackName ' attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_timedTextTrackName() {
- _have_timed_text_track_name_ = true;
- return &timed_text_track_name_;
- }
-
+ bool get_supports_team_drives() const { return supports_team_drives_; }
/**
- * Sets the 'timedTextTrackName ' attribute.
+ * Sets the 'supportsTeamDrives ' attribute.
*
- * @param[in] value The timed text track name.
+ * @param[in] value Whether the requesting application supports Team Drives.
*/
- void set_timed_text_track_name(const string& value) {
- _have_timed_text_track_name_ = true;
- timed_text_track_name_ = value;
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
}
/**
@@ -5544,57 +7156,95 @@ class FilesResource_UpdateMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- File* data) {
+ ParentReference* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
+ private:
+ string file_id_;
+ bool supports_team_drives_;
+ bool _have_supports_team_drives_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(ParentsResource_InsertMethod);
+};
+
+/**
+ * Implements the list method.
+ *
+ * @ingroup ServiceMethod
+ *
+ * This class uses the Command Pattern. Construct an instance with the required
+ * parameters, then set any additional optional parameters by using the
+ * attribute setters. To invoke the method, call Execute .
+ *
+ * One or more of these authorization scopes are required for this method:
+ * https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
+ */
+class ParentsResource_ListMethod : public DriveServiceBaseRequest {
+ public:
+ /**
+ * The standard constructor takes all the required method parameters.
+ * @param[in] _service_ The service instance to send to when executed.
+ * @param[in] _credential_ If not NULL, the credential to authorize with.
+ * In practice this is supplied by the user code that is
+ * creating the method instance.
+ * @param[in] file_id The ID of the file.
+ */
+ ParentsResource_ListMethod(
+ const DriveService* _service_,
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~ParentsResource_ListMethod();
+
+
+ /**
+ * Appends variable value to the target string.
+ *
+ * This is a helper function used to resolve templated variables in the URI.
+ *
+ * @param[in] variable_name The name of the templated variable.
+ * @param[in] config A pass-through parameter used for lists and maps.
+ * @param[in, out] target The string to append the value to.
+ */
+ virtual util::Status AppendVariable(
+ const StringPiece& variable_name,
+ const client::UriTemplateConfig& config,
+ string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ ParentList* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
-
- /**
- * Returns MediaUploader for uploading the content.
- */
-
- /**
- * Returns the specification for media upload using the simple protocol.
- */
- static const client::MediaUploadSpec SIMPLE_MEDIA_UPLOAD;
- /**
- * Returns the specification for media upload using the resumable protocol.
- */
- static const client::MediaUploadSpec RESUMABLE_MEDIA_UPLOAD;
-
private:
string file_id_;
- string add_parents_;
- string modified_date_behavior_;
- string remove_parents_;
- bool update_viewed_date_;
- bool set_modified_date_;
- bool use_content_as_indexable_text_;
- bool convert_;
- string ocr_language_;
- bool pinned_;
- bool new_revision_;
- bool ocr_;
- string timed_text_language_;
- string timed_text_track_name_;
- bool _have_add_parents_ : 1;
- bool _have_modified_date_behavior_ : 1;
- bool _have_remove_parents_ : 1;
- bool _have_update_viewed_date_ : 1;
- bool _have_set_modified_date_ : 1;
- bool _have_use_content_as_indexable_text_ : 1;
- bool _have_convert_ : 1;
- bool _have_ocr_language_ : 1;
- bool _have_pinned_ : 1;
- bool _have_new_revision_ : 1;
- bool _have_ocr_ : 1;
- bool _have_timed_text_language_ : 1;
- bool _have_timed_text_track_name_ : 1;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_UpdateMethod);
+ DISALLOW_COPY_AND_ASSIGN(ParentsResource_ListMethod);
};
+
+
/**
- * Implements the watch method.
+ * Implements the delete method.
*
* @ingroup ServiceMethod
*
@@ -5604,15 +7254,9 @@ class FilesResource_UpdateMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.apps.readonly
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
- * https://www.googleapis.com/auth/drive.readonly
*/
-class FilesResource_WatchMethod : public DriveServiceBaseRequest {
+class PermissionsResource_DeleteMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -5620,156 +7264,46 @@ class FilesResource_WatchMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file in question.
- * @param[in] _content_ The data object to watch.
+ * @param[in] file_id The ID for the file or Team Drive.
+ * @param[in] permission_id The ID for the permission.
*/
- FilesResource_WatchMethod(
+ PermissionsResource_DeleteMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const Channel& _content_);
+ const StringPiece& permission_id);
/**
* Standard destructor.
*/
- virtual ~FilesResource_WatchMethod();
-
-
- /**
- * Clears the 'acknowledgeAbuse ' attribute so it is no longer
- * set.
- */
- void clear_acknowledge_abuse() {
- _have_acknowledge_abuse_ = false;
- client::ClearCppValueHelper(&acknowledge_abuse_);
- }
-
-
- /**
- * Gets the optional 'acknowledgeAbuse ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_acknowledge_abuse() const { return acknowledge_abuse_; }
+ virtual ~PermissionsResource_DeleteMethod();
- /**
- * Sets the 'acknowledgeAbuse ' attribute.
- *
- * @param[in] value Whether the user is acknowledging the risk of
- * downloading known malware or other abusive files.
- */
- void set_acknowledge_abuse(bool value) {
- _have_acknowledge_abuse_ = true;
- acknowledge_abuse_ = value;
- }
/**
- * Clears the 'updateViewedDate ' attribute so it is no longer
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
* set.
*/
- void clear_update_viewed_date() {
- _have_update_viewed_date_ = false;
- client::ClearCppValueHelper(&update_viewed_date_);
- }
-
-
- /**
- * Gets the optional 'updateViewedDate ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_update_viewed_date() const { return update_viewed_date_; }
-
- /**
- * Sets the 'updateViewedDate ' attribute.
- * @deprecated
- *
- * @param[in] value Deprecated: Use files.update with
- * modifiedDateBehavior=noChange, updateViewedDate=true and an empty request
- * body.
- */
- void set_update_viewed_date(bool value) {
- _have_update_viewed_date_ = true;
- update_viewed_date_ = value;
- }
-
- /**
- * Clears the 'revisionId ' attribute so it is no longer set.
- */
- void clear_revision_id() {
- _have_revision_id_ = false;
- client::ClearCppValueHelper(&revision_id_);
- }
-
-
- /**
- * Gets the optional 'revisionId ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_revision_id() const { return revision_id_; }
-
- /**
- * Gets a modifiable pointer to the optional revisionId '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_revisionId() {
- _have_revision_id_ = true;
- return &revision_id_;
- }
-
-
- /**
- * Sets the 'revisionId ' attribute.
- *
- * @param[in] value Specifies the Revision ID that should be downloaded.
- * Ignored unless alt=media is specified.
- */
- void set_revision_id(const string& value) {
- _have_revision_id_ = true;
- revision_id_ = value;
- }
-
-
-
- /**
- * Clears the 'projection ' attribute so it is no longer set.
- */
- void clear_projection() {
- _have_projection_ = false;
- client::ClearCppValueHelper(&projection_);
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
}
/**
- * Gets the optional 'projection ' attribute.
+ * Gets the optional 'supportsTeamDrives ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_projection() const { return projection_; }
-
- /**
- * Gets a modifiable pointer to the optional projection '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_projection() {
- _have_projection_ = true;
- return &projection_;
- }
-
+ bool get_supports_team_drives() const { return supports_team_drives_; }
/**
- * Sets the 'projection ' attribute.
+ * Sets the 'supportsTeamDrives ' attribute.
*
- * @param[in] value This parameter is deprecated and has no function.
+ * @param[in] value Whether the requesting application supports Team Drives.
*/
- void set_projection(const string& value) {
- _have_projection_ = true;
- projection_ = value;
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
}
/**
@@ -5794,56 +7328,16 @@ class FilesResource_WatchMethod : public DriveServiceBaseRequest {
virtual util::Status AppendOptionalQueryParameters(string* target);
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- Channel* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
-
- /**
- * Determine if the request should use Media Download for the response.
- *
- * @return true for media download, false otherwise.
- */
- bool get_use_media_download() const {
- return DriveServiceBaseRequest::get_use_media_download();
- }
-
- /**
- * Sets whether Media Download should be used for the response data.
- *
- * @param[in] use true to use media download, false otherwise.
- */
- void set_use_media_download(bool use) {
- DriveServiceBaseRequest::set_use_media_download(use);
- }
-
private:
string file_id_;
- bool acknowledge_abuse_;
- bool update_viewed_date_;
- string revision_id_;
- string projection_;
- bool _have_acknowledge_abuse_ : 1;
- bool _have_update_viewed_date_ : 1;
- bool _have_revision_id_ : 1;
- bool _have_projection_ : 1; string _content_;
- DISALLOW_COPY_AND_ASSIGN(FilesResource_WatchMethod);
+ string permission_id_;
+ bool supports_team_drives_;
+ bool _have_supports_team_drives_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(PermissionsResource_DeleteMethod);
};
-
-
/**
- * Implements the delete method.
+ * Implements the get method.
*
* @ingroup ServiceMethod
*
@@ -5854,8 +7348,12 @@ class FilesResource_WatchMethod : public DriveServiceBaseRequest {
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
*/
-class ParentsResource_DeleteMethod : public DriveServiceBaseRequest {
+class PermissionsResource_GetMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -5863,20 +7361,47 @@ class ParentsResource_DeleteMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] parent_id The ID of the parent.
+ * @param[in] file_id The ID for the file or Team Drive.
+ * @param[in] permission_id The ID for the permission.
*/
- ParentsResource_DeleteMethod(
+ PermissionsResource_GetMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& parent_id);
+ const StringPiece& permission_id);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~PermissionsResource_GetMethod();
+
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
- /**
- * Standard destructor.
- */
- virtual ~ParentsResource_DeleteMethod();
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
/**
* Appends variable value to the target string.
@@ -5892,15 +7417,39 @@ class ParentsResource_DeleteMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ Permission* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
private:
string file_id_;
- string parent_id_;
- DISALLOW_COPY_AND_ASSIGN(ParentsResource_DeleteMethod);
+ string permission_id_;
+ bool supports_team_drives_;
+ bool _have_supports_team_drives_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(PermissionsResource_GetMethod);
};
/**
- * Implements the get method.
+ * Implements the getIdForEmail method.
*
* @ingroup ServiceMethod
*
@@ -5911,13 +7460,14 @@ class ParentsResource_DeleteMethod : public DriveServiceBaseRequest {
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.appdata
+ * https://www.googleapis.com/auth/drive.apps.readonly
* https://www.googleapis.com/auth/drive.file
* https://www.googleapis.com/auth/drive.metadata
* https://www.googleapis.com/auth/drive.metadata.readonly
* https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class ParentsResource_GetMethod : public DriveServiceBaseRequest {
+class PermissionsResource_GetIdForEmailMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -5925,19 +7475,17 @@ class ParentsResource_GetMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] parent_id The ID of the parent.
+ * @param[in] email The email address for which to return a permission ID.
*/
- ParentsResource_GetMethod(
+ PermissionsResource_GetIdForEmailMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& parent_id);
+ const StringPiece& email);
/**
* Standard destructor.
*/
- virtual ~ParentsResource_GetMethod();
+ virtual ~PermissionsResource_GetIdForEmailMethod();
/**
@@ -5966,14 +7514,13 @@ class ParentsResource_GetMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- ParentReference* data) {
+ PermissionId* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_;
- string parent_id_;
- DISALLOW_COPY_AND_ASSIGN(ParentsResource_GetMethod);
+ string email_;
+ DISALLOW_COPY_AND_ASSIGN(PermissionsResource_GetIdForEmailMethod);
};
/**
@@ -5987,10 +7534,9 @@ class ParentsResource_GetMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
*/
-class ParentsResource_InsertMethod : public DriveServiceBaseRequest {
+class PermissionsResource_InsertMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -5998,20 +7544,116 @@ class ParentsResource_InsertMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
+ * @param[in] file_id The ID for the file or Team Drive.
* @param[in] _content_ The data object to insert.
*/
- ParentsResource_InsertMethod(
+ PermissionsResource_InsertMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const ParentReference& _content_);
+ const Permission& _content_);
/**
* Standard destructor.
*/
- virtual ~ParentsResource_InsertMethod();
+ virtual ~PermissionsResource_InsertMethod();
+
+
+ /**
+ * Clears the 'emailMessage ' attribute so it is no longer set.
+ */
+ void clear_email_message() {
+ _have_email_message_ = false;
+ client::ClearCppValueHelper(&email_message_);
+ }
+
+
+ /**
+ * Gets the optional 'emailMessage ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_email_message() const { return email_message_; }
+
+ /**
+ * Gets a modifiable pointer to the optional emailMessage '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_emailMessage() {
+ _have_email_message_ = true;
+ return &email_message_;
+ }
+
+
+ /**
+ * Sets the 'emailMessage ' attribute.
+ *
+ * @param[in] value A custom message to include in notification emails.
+ */
+ void set_email_message(const string& value) {
+ _have_email_message_ = true;
+ email_message_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'sendNotificationEmails ' attribute so it is no
+ * longer set.
+ */
+ void clear_send_notification_emails() {
+ _have_send_notification_emails_ = false;
+ client::ClearCppValueHelper(&send_notification_emails_);
+ }
+
+
+ /**
+ * Gets the optional 'sendNotificationEmails ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_send_notification_emails() const { return send_notification_emails_; }
+
+ /**
+ * Sets the 'sendNotificationEmails ' attribute.
+ *
+ * @param[in] value Whether to send notification emails when sharing to
+ * users or groups. This parameter is ignored and an email is sent if the
+ * role is owner.
+ */
+ void set_send_notification_emails(bool value) {
+ _have_send_notification_emails_ = true;
+ send_notification_emails_ = value;
+ }
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
/**
* Appends variable value to the target string.
@@ -6027,6 +7669,13 @@ class ParentsResource_InsertMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
/**
* Executes the method and parses the response into a data object on success.
@@ -6039,13 +7688,19 @@ class ParentsResource_InsertMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- ParentReference* data) {
+ Permission* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(ParentsResource_InsertMethod);
+ string file_id_;
+ string email_message_;
+ bool send_notification_emails_;
+ bool supports_team_drives_;
+ bool _have_email_message_ : 1;
+ bool _have_send_notification_emails_ : 1;
+ bool _have_supports_team_drives_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(PermissionsResource_InsertMethod);
};
/**
@@ -6059,14 +7714,13 @@ class ParentsResource_InsertMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
* https://www.googleapis.com/auth/drive.metadata
* https://www.googleapis.com/auth/drive.metadata.readonly
* https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class ParentsResource_ListMethod : public DriveServiceBaseRequest {
+class PermissionsResource_ListMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6074,18 +7728,116 @@ class ParentsResource_ListMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
+ * @param[in] file_id The ID for the file or Team Drive.
*/
- ParentsResource_ListMethod(
+ PermissionsResource_ListMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id);
- /**
- * Standard destructor.
- */
- virtual ~ParentsResource_ListMethod();
+ /**
+ * Standard destructor.
+ */
+ virtual ~PermissionsResource_ListMethod();
+
+
+ /**
+ * Clears the 'maxResults ' attribute so it is no longer set.
+ */
+ void clear_max_results() {
+ _have_max_results_ = false;
+ client::ClearCppValueHelper(&max_results_);
+ }
+
+
+ /**
+ * Gets the optional 'maxResults ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ int32 get_max_results() const { return max_results_; }
+
+ /**
+ * Sets the 'maxResults ' attribute.
+ *
+ * @param[in] value The maximum number of permissions to return per page.
+ * When not set for files in a Team Drive, at most 100 results will be
+ * returned. When not set for files that are not in a Team Drive, the entire
+ * list will be returned.
+ */
+ void set_max_results(int32 value) {
+ _have_max_results_ = true;
+ max_results_ = value;
+ }
+
+ /**
+ * Clears the 'pageToken ' attribute so it is no longer set.
+ */
+ void clear_page_token() {
+ _have_page_token_ = false;
+ client::ClearCppValueHelper(&page_token_);
+ }
+
+
+ /**
+ * Gets the optional 'pageToken ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_page_token() const { return page_token_; }
+
+ /**
+ * Gets a modifiable pointer to the optional pageToken '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_pageToken() {
+ _have_page_token_ = true;
+ return &page_token_;
+ }
+
+
+ /**
+ * Sets the 'pageToken ' attribute.
+ *
+ * @param[in] value The token for continuing a previous list request on the
+ * next page. This should be set to the value of 'nextPageToken' from the
+ * previous response.
+ */
+ void set_page_token(const string& value) {
+ _have_page_token_ = true;
+ page_token_ = value;
+ }
+
+
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
/**
* Appends variable value to the target string.
@@ -6101,6 +7853,13 @@ class ParentsResource_ListMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
/**
* Executes the method and parses the response into a data object on success.
@@ -6113,19 +7872,28 @@ class ParentsResource_ListMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- ParentList* data) {
+ PermissionList* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- DISALLOW_COPY_AND_ASSIGN(ParentsResource_ListMethod);
+ int32 max_results_;
+ string page_token_;
+ bool supports_team_drives_;
+ bool _have_max_results_ : 1;
+ bool _have_page_token_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(PermissionsResource_ListMethod);
};
-
+typedef client::ServiceRequestPager<
+ PermissionsResource_ListMethod,
+ PermissionList>
+ PermissionsResource_ListMethodPager;
/**
- * Implements the delete method.
+ * Implements the patch method.
*
* @ingroup ServiceMethod
*
@@ -6137,7 +7905,7 @@ class ParentsResource_ListMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.file
*/
-class PermissionsResource_DeleteMethod : public DriveServiceBaseRequest {
+class PermissionsResource_PatchMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6145,20 +7913,105 @@ class PermissionsResource_DeleteMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file.
+ * @param[in] file_id The ID for the file or Team Drive.
* @param[in] permission_id The ID for the permission.
+ * @param[in] _content_ The data object to patch.
*/
- PermissionsResource_DeleteMethod(
+ PermissionsResource_PatchMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& permission_id);
+ const StringPiece& permission_id,
+ const Permission& _content_);
/**
* Standard destructor.
*/
- virtual ~PermissionsResource_DeleteMethod();
+ virtual ~PermissionsResource_PatchMethod();
+
+
+ /**
+ * Clears the 'removeExpiration ' attribute so it is no longer
+ * set.
+ */
+ void clear_remove_expiration() {
+ _have_remove_expiration_ = false;
+ client::ClearCppValueHelper(&remove_expiration_);
+ }
+
+
+ /**
+ * Gets the optional 'removeExpiration ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_remove_expiration() const { return remove_expiration_; }
+
+ /**
+ * Sets the 'removeExpiration ' attribute.
+ *
+ * @param[in] value Whether to remove the expiration date.
+ */
+ void set_remove_expiration(bool value) {
+ _have_remove_expiration_ = true;
+ remove_expiration_ = value;
+ }
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Clears the 'transferOwnership ' attribute so it is no longer
+ * set.
+ */
+ void clear_transfer_ownership() {
+ _have_transfer_ownership_ = false;
+ client::ClearCppValueHelper(&transfer_ownership_);
+ }
+
+
+ /**
+ * Gets the optional 'transferOwnership ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_transfer_ownership() const { return transfer_ownership_; }
+ /**
+ * Sets the 'transferOwnership ' attribute.
+ *
+ * @param[in] value Whether changing a role to 'owner' downgrades the
+ * current owners to writers. Does nothing if the specified role is not
+ * 'owner'.
+ */
+ void set_transfer_ownership(bool value) {
+ _have_transfer_ownership_ = true;
+ transfer_ownership_ = value;
+ }
/**
* Appends variable value to the target string.
@@ -6174,15 +8027,43 @@ class PermissionsResource_DeleteMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
+
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ Permission* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
private:
string file_id_;
string permission_id_;
- DISALLOW_COPY_AND_ASSIGN(PermissionsResource_DeleteMethod);
+ bool remove_expiration_;
+ bool supports_team_drives_;
+ bool transfer_ownership_;
+ bool _have_remove_expiration_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_transfer_ownership_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(PermissionsResource_PatchMethod);
};
/**
- * Implements the get method.
+ * Implements the update method.
*
* @ingroup ServiceMethod
*
@@ -6193,12 +8074,8 @@ class PermissionsResource_DeleteMethod : public DriveServiceBaseRequest {
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
- * https://www.googleapis.com/auth/drive.readonly
*/
-class PermissionsResource_GetMethod : public DriveServiceBaseRequest {
+class PermissionsResource_UpdateMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6206,20 +8083,105 @@ class PermissionsResource_GetMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file.
+ * @param[in] file_id The ID for the file or Team Drive.
* @param[in] permission_id The ID for the permission.
+ * @param[in] _content_ The data object to update.
*/
- PermissionsResource_GetMethod(
+ PermissionsResource_UpdateMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& permission_id);
+ const StringPiece& permission_id,
+ const Permission& _content_);
/**
* Standard destructor.
*/
- virtual ~PermissionsResource_GetMethod();
+ virtual ~PermissionsResource_UpdateMethod();
+
+
+ /**
+ * Clears the 'removeExpiration ' attribute so it is no longer
+ * set.
+ */
+ void clear_remove_expiration() {
+ _have_remove_expiration_ = false;
+ client::ClearCppValueHelper(&remove_expiration_);
+ }
+
+
+ /**
+ * Gets the optional 'removeExpiration ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_remove_expiration() const { return remove_expiration_; }
+
+ /**
+ * Sets the 'removeExpiration ' attribute.
+ *
+ * @param[in] value Whether to remove the expiration date.
+ */
+ void set_remove_expiration(bool value) {
+ _have_remove_expiration_ = true;
+ remove_expiration_ = value;
+ }
+
+ /**
+ * Clears the 'supportsTeamDrives ' attribute so it is no longer
+ * set.
+ */
+ void clear_supports_team_drives() {
+ _have_supports_team_drives_ = false;
+ client::ClearCppValueHelper(&supports_team_drives_);
+ }
+
+
+ /**
+ * Gets the optional 'supportsTeamDrives ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_supports_team_drives() const { return supports_team_drives_; }
+
+ /**
+ * Sets the 'supportsTeamDrives ' attribute.
+ *
+ * @param[in] value Whether the requesting application supports Team Drives.
+ */
+ void set_supports_team_drives(bool value) {
+ _have_supports_team_drives_ = true;
+ supports_team_drives_ = value;
+ }
+
+ /**
+ * Clears the 'transferOwnership ' attribute so it is no longer
+ * set.
+ */
+ void clear_transfer_ownership() {
+ _have_transfer_ownership_ = false;
+ client::ClearCppValueHelper(&transfer_ownership_);
+ }
+
+
+ /**
+ * Gets the optional 'transferOwnership ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_transfer_ownership() const { return transfer_ownership_; }
+ /**
+ * Sets the 'transferOwnership ' attribute.
+ *
+ * @param[in] value Whether changing a role to 'owner' downgrades the
+ * current owners to writers. Does nothing if the specified role is not
+ * 'owner'.
+ */
+ void set_transfer_ownership(bool value) {
+ _have_transfer_ownership_ = true;
+ transfer_ownership_ = value;
+ }
/**
* Appends variable value to the target string.
@@ -6235,6 +8197,13 @@ class PermissionsResource_GetMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
/**
* Executes the method and parses the response into a data object on success.
@@ -6254,11 +8223,19 @@ class PermissionsResource_GetMethod : public DriveServiceBaseRequest {
private:
string file_id_;
string permission_id_;
- DISALLOW_COPY_AND_ASSIGN(PermissionsResource_GetMethod);
+ bool remove_expiration_;
+ bool supports_team_drives_;
+ bool transfer_ownership_;
+ bool _have_remove_expiration_ : 1;
+ bool _have_supports_team_drives_ : 1;
+ bool _have_transfer_ownership_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(PermissionsResource_UpdateMethod);
};
+
+
/**
- * Implements the getIdForEmail method.
+ * Implements the delete method.
*
* @ingroup ServiceMethod
*
@@ -6269,14 +8246,10 @@ class PermissionsResource_GetMethod : public DriveServiceBaseRequest {
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.apps.readonly
* https://www.googleapis.com/auth/drive.file
* https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
- * https://www.googleapis.com/auth/drive.readonly
*/
-class PermissionsResource_GetIdForEmailMethod : public DriveServiceBaseRequest {
+class PropertiesResource_DeleteMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6284,19 +8257,59 @@ class PermissionsResource_GetIdForEmailMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] email The email address for which to return a permission ID.
+ * @param[in] file_id The ID of the file.
+ * @param[in] property_key The key of the property.
*/
- PermissionsResource_GetIdForEmailMethod(
+ PropertiesResource_DeleteMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& email);
+ const StringPiece& file_id,
+ const StringPiece& property_key);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~PropertiesResource_DeleteMethod();
+
+
+ /**
+ * Clears the 'visibility ' attribute so it is no longer set.
+ */
+ void clear_visibility() {
+ _have_visibility_ = false;
+ client::ClearCppValueHelper(&visibility_);
+ }
+
+
+ /**
+ * Gets the optional 'visibility ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_visibility() const { return visibility_; }
- /**
- * Standard destructor.
- */
- virtual ~PermissionsResource_GetIdForEmailMethod();
+ /**
+ * Gets a modifiable pointer to the optional visibility '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_visibility() {
+ _have_visibility_ = true;
+ return &visibility_;
+ }
+ /**
+ * Sets the 'visibility ' attribute.
+ *
+ * @param[in] value The visibility of the property.
+ */
+ void set_visibility(const string& value) {
+ _have_visibility_ = true;
+ visibility_ = value;
+ }
+
/**
* Appends variable value to the target string.
*
@@ -6311,29 +8324,24 @@ class PermissionsResource_GetIdForEmailMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
-
/**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
+ * Appends the optional query parameters to the target URL.
*
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
+ * @param[in, out] target The URL string to append to.
*/
- util::Status ExecuteAndParseResponse(
- PermissionId* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
private:
- string email_;
- DISALLOW_COPY_AND_ASSIGN(PermissionsResource_GetIdForEmailMethod);
+ string file_id_;
+ string property_key_;
+ string visibility_;
+ bool _have_visibility_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(PropertiesResource_DeleteMethod);
};
/**
- * Implements the insert method.
+ * Implements the get method.
*
* @ingroup ServiceMethod
*
@@ -6343,9 +8351,14 @@ class PermissionsResource_GetIdForEmailMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
*/
-class PermissionsResource_InsertMethod : public DriveServiceBaseRequest {
+class PropertiesResource_GetMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6353,88 +8366,57 @@ class PermissionsResource_InsertMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file.
- * @param[in] _content_ The data object to insert.
+ * @param[in] file_id The ID of the file.
+ * @param[in] property_key The key of the property.
*/
- PermissionsResource_InsertMethod(
+ PropertiesResource_GetMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const Permission& _content_);
+ const StringPiece& property_key);
/**
* Standard destructor.
*/
- virtual ~PermissionsResource_InsertMethod();
+ virtual ~PropertiesResource_GetMethod();
/**
- * Clears the 'emailMessage ' attribute so it is no longer set.
+ * Clears the 'visibility ' attribute so it is no longer set.
*/
- void clear_email_message() {
- _have_email_message_ = false;
- client::ClearCppValueHelper(&email_message_);
+ void clear_visibility() {
+ _have_visibility_ = false;
+ client::ClearCppValueHelper(&visibility_);
}
/**
- * Gets the optional 'emailMessage ' attribute.
+ * Gets the optional 'visibility ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_email_message() const { return email_message_; }
+ const string& get_visibility() const { return visibility_; }
/**
- * Gets a modifiable pointer to the optional emailMessage '
+ * Gets a modifiable pointer to the optional visibility '
* attribute.
*
* @return The value can be set by dereferencing the pointer.
*/
- string* mutable_emailMessage() {
- _have_email_message_ = true;
- return &email_message_;
- }
-
-
- /**
- * Sets the 'emailMessage ' attribute.
- *
- * @param[in] value A custom message to include in notification emails.
- */
- void set_email_message(const string& value) {
- _have_email_message_ = true;
- email_message_ = value;
- }
-
-
-
- /**
- * Clears the 'sendNotificationEmails ' attribute so it is no
- * longer set.
- */
- void clear_send_notification_emails() {
- _have_send_notification_emails_ = false;
- client::ClearCppValueHelper(&send_notification_emails_);
+ string* mutable_visibility() {
+ _have_visibility_ = true;
+ return &visibility_;
}
/**
- * Gets the optional 'sendNotificationEmails ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_send_notification_emails() const { return send_notification_emails_; }
-
- /**
- * Sets the 'sendNotificationEmails ' attribute.
+ * Sets the 'visibility ' attribute.
*
- * @param[in] value Whether to send notification emails when sharing to
- * users or groups. This parameter is ignored and an email is sent if the
- * role is owner.
+ * @param[in] value The visibility of the property.
*/
- void set_send_notification_emails(bool value) {
- _have_send_notification_emails_ = true;
- send_notification_emails_ = value;
+ void set_visibility(const string& value) {
+ _have_visibility_ = true;
+ visibility_ = value;
}
/**
@@ -6470,21 +8452,20 @@ class PermissionsResource_InsertMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Permission* data) {
+ Property* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- string email_message_;
- bool send_notification_emails_;
- bool _have_email_message_ : 1;
- bool _have_send_notification_emails_ : 1; string _content_;
- DISALLOW_COPY_AND_ASSIGN(PermissionsResource_InsertMethod);
+ string property_key_;
+ string visibility_;
+ bool _have_visibility_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(PropertiesResource_GetMethod);
};
/**
- * Implements the list method.
+ * Implements the insert method.
*
* @ingroup ServiceMethod
*
@@ -6494,13 +8475,11 @@ class PermissionsResource_InsertMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
* https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
- * https://www.googleapis.com/auth/drive.readonly
*/
-class PermissionsResource_ListMethod : public DriveServiceBaseRequest {
+class PropertiesResource_InsertMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6508,17 +8487,19 @@ class PermissionsResource_ListMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file.
+ * @param[in] file_id The ID of the file.
+ * @param[in] _content_ The data object to insert.
*/
- PermissionsResource_ListMethod(
+ PropertiesResource_InsertMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
+ const StringPiece& file_id,
+ const Property& _content_);
/**
* Standard destructor.
*/
- virtual ~PermissionsResource_ListMethod();
+ virtual ~PropertiesResource_InsertMethod();
/**
@@ -6547,17 +8528,17 @@ class PermissionsResource_ListMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- PermissionList* data) {
+ Property* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_;
- DISALLOW_COPY_AND_ASSIGN(PermissionsResource_ListMethod);
+ string file_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(PropertiesResource_InsertMethod);
};
/**
- * Implements the patch method.
+ * Implements the list method.
*
* @ingroup ServiceMethod
*
@@ -6567,9 +8548,14 @@ class PermissionsResource_ListMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
*/
-class PermissionsResource_PatchMethod : public DriveServiceBaseRequest {
+class PropertiesResource_ListMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6577,51 +8563,18 @@ class PermissionsResource_PatchMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file.
- * @param[in] permission_id The ID for the permission.
- * @param[in] _content_ The data object to patch.
+ * @param[in] file_id The ID of the file.
*/
- PermissionsResource_PatchMethod(
+ PropertiesResource_ListMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& permission_id,
- const Permission& _content_);
+ const StringPiece& file_id);
/**
* Standard destructor.
*/
- virtual ~PermissionsResource_PatchMethod();
-
-
- /**
- * Clears the 'transferOwnership ' attribute so it is no longer
- * set.
- */
- void clear_transfer_ownership() {
- _have_transfer_ownership_ = false;
- client::ClearCppValueHelper(&transfer_ownership_);
- }
-
-
- /**
- * Gets the optional 'transferOwnership ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_transfer_ownership() const { return transfer_ownership_; }
+ virtual ~PropertiesResource_ListMethod();
- /**
- * Sets the 'transferOwnership ' attribute.
- *
- * @param[in] value Whether changing a role to 'owner' downgrades the
- * current owners to writers. Does nothing if the specified role is not
- * 'owner'.
- */
- void set_transfer_ownership(bool value) {
- _have_transfer_ownership_ = true;
- transfer_ownership_ = value;
- }
/**
* Appends variable value to the target string.
@@ -6637,13 +8590,6 @@ class PermissionsResource_PatchMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
- /**
- * Appends the optional query parameters to the target URL.
- *
- * @param[in, out] target The URL string to append to.
- */
- virtual util::Status AppendOptionalQueryParameters(string* target);
-
/**
* Executes the method and parses the response into a data object on success.
@@ -6656,20 +8602,17 @@ class PermissionsResource_PatchMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Permission* data) {
+ PropertyList* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- string permission_id_;
- bool transfer_ownership_;
- bool _have_transfer_ownership_ : 1; string _content_;
- DISALLOW_COPY_AND_ASSIGN(PermissionsResource_PatchMethod);
+ DISALLOW_COPY_AND_ASSIGN(PropertiesResource_ListMethod);
};
/**
- * Implements the update method.
+ * Implements the patch method.
*
* @ingroup ServiceMethod
*
@@ -6679,9 +8622,11 @@ class PermissionsResource_PatchMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
*/
-class PermissionsResource_UpdateMethod : public DriveServiceBaseRequest {
+class PropertiesResource_PatchMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6689,50 +8634,59 @@ class PermissionsResource_UpdateMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file.
- * @param[in] permission_id The ID for the permission.
- * @param[in] _content_ The data object to update.
+ * @param[in] file_id The ID of the file.
+ * @param[in] property_key The key of the property.
+ * @param[in] _content_ The data object to patch.
*/
- PermissionsResource_UpdateMethod(
+ PropertiesResource_PatchMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& permission_id,
- const Permission& _content_);
+ const StringPiece& property_key,
+ const Property& _content_);
/**
* Standard destructor.
*/
- virtual ~PermissionsResource_UpdateMethod();
+ virtual ~PropertiesResource_PatchMethod();
/**
- * Clears the 'transferOwnership ' attribute so it is no longer
- * set.
- */
- void clear_transfer_ownership() {
- _have_transfer_ownership_ = false;
- client::ClearCppValueHelper(&transfer_ownership_);
+ * Clears the 'visibility ' attribute so it is no longer set.
+ */
+ void clear_visibility() {
+ _have_visibility_ = false;
+ client::ClearCppValueHelper(&visibility_);
}
/**
- * Gets the optional 'transferOwnership ' attribute.
+ * Gets the optional 'visibility ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- bool get_transfer_ownership() const { return transfer_ownership_; }
+ const string& get_visibility() const { return visibility_; }
/**
- * Sets the 'transferOwnership ' attribute.
+ * Gets a modifiable pointer to the optional visibility '
+ * attribute.
*
- * @param[in] value Whether changing a role to 'owner' downgrades the
- * current owners to writers. Does nothing if the specified role is not
- * 'owner'.
+ * @return The value can be set by dereferencing the pointer.
*/
- void set_transfer_ownership(bool value) {
- _have_transfer_ownership_ = true;
- transfer_ownership_ = value;
+ string* mutable_visibility() {
+ _have_visibility_ = true;
+ return &visibility_;
+ }
+
+
+ /**
+ * Sets the 'visibility ' attribute.
+ *
+ * @param[in] value The visibility of the property.
+ */
+ void set_visibility(const string& value) {
+ _have_visibility_ = true;
+ visibility_ = value;
}
/**
@@ -6768,22 +8722,20 @@ class PermissionsResource_UpdateMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Permission* data) {
+ Property* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- string permission_id_;
- bool transfer_ownership_;
- bool _have_transfer_ownership_ : 1; string _content_;
- DISALLOW_COPY_AND_ASSIGN(PermissionsResource_UpdateMethod);
+ string property_key_;
+ string visibility_;
+ bool _have_visibility_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(PropertiesResource_PatchMethod);
};
-
-
/**
- * Implements the delete method.
+ * Implements the update method.
*
* @ingroup ServiceMethod
*
@@ -6797,7 +8749,7 @@ class PermissionsResource_UpdateMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive.file
* https://www.googleapis.com/auth/drive.metadata
*/
-class PropertiesResource_DeleteMethod : public DriveServiceBaseRequest {
+class PropertiesResource_UpdateMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6807,17 +8759,19 @@ class PropertiesResource_DeleteMethod : public DriveServiceBaseRequest {
* creating the method instance.
* @param[in] file_id The ID of the file.
* @param[in] property_key The key of the property.
+ * @param[in] _content_ The data object to update.
*/
- PropertiesResource_DeleteMethod(
+ PropertiesResource_UpdateMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& property_key);
+ const StringPiece& property_key,
+ const Property& _content_);
/**
* Standard destructor.
*/
- virtual ~PropertiesResource_DeleteMethod();
+ virtual ~PropertiesResource_UpdateMethod();
/**
@@ -6880,14 +8834,31 @@ class PropertiesResource_DeleteMethod : public DriveServiceBaseRequest {
virtual util::Status AppendOptionalQueryParameters(string* target);
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ Property* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
private:
string file_id_;
string property_key_;
string visibility_;
- bool _have_visibility_ : 1;
- DISALLOW_COPY_AND_ASSIGN(PropertiesResource_DeleteMethod);
+ bool _have_visibility_ : 1; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(PropertiesResource_UpdateMethod);
};
+
+
/**
* Implements the get method.
*
@@ -6899,14 +8870,10 @@ class PropertiesResource_DeleteMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class PropertiesResource_GetMethod : public DriveServiceBaseRequest {
+class RealtimeResource_GetMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -6914,57 +8881,47 @@ class PropertiesResource_GetMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] property_key The key of the property.
+ * @param[in] file_id The ID of the file that the Realtime API data model is
+ * associated with.
*/
- PropertiesResource_GetMethod(
+ RealtimeResource_GetMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& property_key);
+ const StringPiece& file_id);
/**
* Standard destructor.
*/
- virtual ~PropertiesResource_GetMethod();
+ virtual ~RealtimeResource_GetMethod();
/**
- * Clears the 'visibility ' attribute so it is no longer set.
+ * Clears the 'revision ' attribute so it is no longer set.
*/
- void clear_visibility() {
- _have_visibility_ = false;
- client::ClearCppValueHelper(&visibility_);
+ void clear_revision() {
+ _have_revision_ = false;
+ client::ClearCppValueHelper(&revision_);
}
/**
- * Gets the optional 'visibility ' attribute.
+ * Gets the optional 'revision ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_visibility() const { return visibility_; }
-
- /**
- * Gets a modifiable pointer to the optional visibility '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_visibility() {
- _have_visibility_ = true;
- return &visibility_;
- }
-
+ int32 get_revision() const { return revision_; }
/**
- * Sets the 'visibility ' attribute.
+ * Sets the 'revision ' attribute.
*
- * @param[in] value The visibility of the property.
+ * @param[in] value The revision of the Realtime API data model to export.
+ * Revisions start at 1 (the initial empty data model) and are incremented
+ * with each change. If this parameter is excluded, the most recent data
+ * model will be returned.
*/
- void set_visibility(const string& value) {
- _have_visibility_ = true;
- visibility_ = value;
+ void set_revision(int32 value) {
+ _have_revision_ = true;
+ revision_ = value;
}
/**
@@ -6990,30 +8947,32 @@ class PropertiesResource_GetMethod : public DriveServiceBaseRequest {
/**
- * Executes the method and parses the response into a data object on success.
+ * Determine if the request should use Media Download for the response.
*
- * @param[out] data Loads from the response payload JSON data on success.
+ * @return true for media download, false otherwise.
+ */
+ bool get_use_media_download() const {
+ return DriveServiceBaseRequest::get_use_media_download();
+ }
+
+ /**
+ * Sets whether Media Download should be used for the response data.
*
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
+ * @param[in] use true to use media download, false otherwise.
*/
- util::Status ExecuteAndParseResponse(
- Property* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ void set_use_media_download(bool use) {
+ DriveServiceBaseRequest::set_use_media_download(use);
}
private:
string file_id_;
- string property_key_;
- string visibility_;
- bool _have_visibility_ : 1;
- DISALLOW_COPY_AND_ASSIGN(PropertiesResource_GetMethod);
+ int32 revision_;
+ bool _have_revision_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(RealtimeResource_GetMethod);
};
/**
- * Implements the insert method.
+ * Implements the update method.
*
* @ingroup ServiceMethod
*
@@ -7023,11 +8982,9 @@ class PropertiesResource_GetMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
*/
-class PropertiesResource_InsertMethod : public DriveServiceBaseRequest {
+class RealtimeResource_UpdateMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7035,20 +8992,68 @@ class PropertiesResource_InsertMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] _content_ The data object to insert.
+ * @param[in] file_id The ID of the file that the Realtime API data model is
+ * associated with.
+ * @param[in] _media_content_type_ The content type of the data in the
+ * _media_content_reader_.
+ * @param[in] _media_content_reader_ The media content to update. If
+ * this is NULL then do not upload any media and ignore
+ * _media_content_type_.
*/
- PropertiesResource_InsertMethod(
+ RealtimeResource_UpdateMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const Property& _content_);
+ const StringPiece& _media_content_type_,
+ client::DataReader* _media_content_reader_);
/**
* Standard destructor.
*/
- virtual ~PropertiesResource_InsertMethod();
+ virtual ~RealtimeResource_UpdateMethod();
+
+
+ /**
+ * Clears the 'baseRevision ' attribute so it is no longer set.
+ */
+ void clear_base_revision() {
+ _have_base_revision_ = false;
+ client::ClearCppValueHelper(&base_revision_);
+ }
+
+
+ /**
+ * Gets the optional 'baseRevision ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_base_revision() const { return base_revision_; }
+
+ /**
+ * Gets a modifiable pointer to the optional baseRevision '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_baseRevision() {
+ _have_base_revision_ = true;
+ return &base_revision_;
+ }
+
+ /**
+ * Sets the 'baseRevision ' attribute.
+ *
+ * @param[in] value The revision of the model to diff the uploaded model
+ * against. If set, the uploaded model is diffed against the provided
+ * revision and those differences are merged with any changes made to the
+ * model after the provided revision. If not set, the uploaded model
+ * replaces the current model on the server.
+ */
+ void set_base_revision(const string& value) {
+ _have_base_revision_ = true;
+ base_revision_ = value;
+ }
/**
* Appends variable value to the target string.
@@ -7064,29 +9069,39 @@ class PropertiesResource_InsertMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
-
/**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
+ * Appends the optional query parameters to the target URL.
*
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
+ * @param[in, out] target The URL string to append to.
*/
- util::Status ExecuteAndParseResponse(
- Property* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
+ virtual util::Status AppendOptionalQueryParameters(string* target);
- private:
- string file_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(PropertiesResource_InsertMethod);
+
+
+ /**
+ * Returns MediaUploader for uploading the content.
+ */
+
+ /**
+ * Returns the specification for media upload using the simple protocol.
+ */
+ static const client::MediaUploadSpec SIMPLE_MEDIA_UPLOAD;
+ /**
+ * Returns the specification for media upload using the resumable protocol.
+ */
+ static const client::MediaUploadSpec RESUMABLE_MEDIA_UPLOAD;
+
+ private:
+ string file_id_;
+ string base_revision_;
+ bool _have_base_revision_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(RealtimeResource_UpdateMethod);
};
+
+
/**
- * Implements the list method.
+ * Implements the delete method.
*
* @ingroup ServiceMethod
*
@@ -7096,14 +9111,9 @@ class PropertiesResource_InsertMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
- * https://www.googleapis.com/auth/drive.readonly
*/
-class PropertiesResource_ListMethod : public DriveServiceBaseRequest {
+class RepliesResource_DeleteMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7112,16 +9122,20 @@ class PropertiesResource_ListMethod : public DriveServiceBaseRequest {
* In practice this is supplied by the user code that is
* creating the method instance.
* @param[in] file_id The ID of the file.
+ * @param[in] comment_id The ID of the comment.
+ * @param[in] reply_id The ID of the reply.
*/
- PropertiesResource_ListMethod(
+ RepliesResource_DeleteMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
+ const StringPiece& file_id,
+ const StringPiece& comment_id,
+ const StringPiece& reply_id);
/**
* Standard destructor.
*/
- virtual ~PropertiesResource_ListMethod();
+ virtual ~RepliesResource_DeleteMethod();
/**
@@ -7139,28 +9153,15 @@ class PropertiesResource_ListMethod : public DriveServiceBaseRequest {
string* target);
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- PropertyList* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
-
private:
string file_id_;
- DISALLOW_COPY_AND_ASSIGN(PropertiesResource_ListMethod);
+ string comment_id_;
+ string reply_id_;
+ DISALLOW_COPY_AND_ASSIGN(RepliesResource_DeleteMethod);
};
/**
- * Implements the patch method.
+ * Implements the get method.
*
* @ingroup ServiceMethod
*
@@ -7170,11 +9171,10 @@ class PropertiesResource_ListMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.readonly
*/
-class PropertiesResource_PatchMethod : public DriveServiceBaseRequest {
+class RepliesResource_GetMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7183,58 +9183,48 @@ class PropertiesResource_PatchMethod : public DriveServiceBaseRequest {
* In practice this is supplied by the user code that is
* creating the method instance.
* @param[in] file_id The ID of the file.
- * @param[in] property_key The key of the property.
- * @param[in] _content_ The data object to patch.
+ * @param[in] comment_id The ID of the comment.
+ * @param[in] reply_id The ID of the reply.
*/
- PropertiesResource_PatchMethod(
+ RepliesResource_GetMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& property_key,
- const Property& _content_);
+ const StringPiece& comment_id,
+ const StringPiece& reply_id);
/**
* Standard destructor.
*/
- virtual ~PropertiesResource_PatchMethod();
+ virtual ~RepliesResource_GetMethod();
/**
- * Clears the 'visibility ' attribute so it is no longer set.
+ * Clears the 'includeDeleted ' attribute so it is no longer
+ * set.
*/
- void clear_visibility() {
- _have_visibility_ = false;
- client::ClearCppValueHelper(&visibility_);
+ void clear_include_deleted() {
+ _have_include_deleted_ = false;
+ client::ClearCppValueHelper(&include_deleted_);
}
/**
- * Gets the optional 'visibility ' attribute.
+ * Gets the optional 'includeDeleted ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- const string& get_visibility() const { return visibility_; }
-
- /**
- * Gets a modifiable pointer to the optional visibility '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_visibility() {
- _have_visibility_ = true;
- return &visibility_;
- }
-
+ bool get_include_deleted() const { return include_deleted_; }
/**
- * Sets the 'visibility ' attribute.
+ * Sets the 'includeDeleted ' attribute.
*
- * @param[in] value The visibility of the property.
+ * @param[in] value If set, this will succeed when retrieving a deleted
+ * reply.
*/
- void set_visibility(const string& value) {
- _have_visibility_ = true;
- visibility_ = value;
+ void set_include_deleted(bool value) {
+ _have_include_deleted_ = true;
+ include_deleted_ = value;
}
/**
@@ -7270,20 +9260,21 @@ class PropertiesResource_PatchMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Property* data) {
+ CommentReply* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- string property_key_;
- string visibility_;
- bool _have_visibility_ : 1; string _content_;
- DISALLOW_COPY_AND_ASSIGN(PropertiesResource_PatchMethod);
+ string comment_id_;
+ string reply_id_;
+ bool include_deleted_;
+ bool _have_include_deleted_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(RepliesResource_GetMethod);
};
/**
- * Implements the update method.
+ * Implements the insert method.
*
* @ingroup ServiceMethod
*
@@ -7293,11 +9284,9 @@ class PropertiesResource_PatchMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
*/
-class PropertiesResource_UpdateMethod : public DriveServiceBaseRequest {
+class RepliesResource_InsertMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7306,59 +9295,21 @@ class PropertiesResource_UpdateMethod : public DriveServiceBaseRequest {
* In practice this is supplied by the user code that is
* creating the method instance.
* @param[in] file_id The ID of the file.
- * @param[in] property_key The key of the property.
- * @param[in] _content_ The data object to update.
+ * @param[in] comment_id The ID of the comment.
+ * @param[in] _content_ The data object to insert.
*/
- PropertiesResource_UpdateMethod(
+ RepliesResource_InsertMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& property_key,
- const Property& _content_);
+ const StringPiece& comment_id,
+ const CommentReply& _content_);
/**
* Standard destructor.
*/
- virtual ~PropertiesResource_UpdateMethod();
-
-
- /**
- * Clears the 'visibility ' attribute so it is no longer set.
- */
- void clear_visibility() {
- _have_visibility_ = false;
- client::ClearCppValueHelper(&visibility_);
- }
-
-
- /**
- * Gets the optional 'visibility ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_visibility() const { return visibility_; }
-
- /**
- * Gets a modifiable pointer to the optional visibility '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_visibility() {
- _have_visibility_ = true;
- return &visibility_;
- }
-
+ virtual ~RepliesResource_InsertMethod();
- /**
- * Sets the 'visibility ' attribute.
- *
- * @param[in] value The visibility of the property.
- */
- void set_visibility(const string& value) {
- _have_visibility_ = true;
- visibility_ = value;
- }
/**
* Appends variable value to the target string.
@@ -7374,13 +9325,6 @@ class PropertiesResource_UpdateMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
- /**
- * Appends the optional query parameters to the target URL.
- *
- * @param[in, out] target The URL string to append to.
- */
- virtual util::Status AppendOptionalQueryParameters(string* target);
-
/**
* Executes the method and parses the response into a data object on success.
@@ -7393,22 +9337,18 @@ class PropertiesResource_UpdateMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Property* data) {
+ CommentReply* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- string property_key_;
- string visibility_;
- bool _have_visibility_ : 1; string _content_;
- DISALLOW_COPY_AND_ASSIGN(PropertiesResource_UpdateMethod);
+ string comment_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(RepliesResource_InsertMethod);
};
-
-
/**
- * Implements the get method.
+ * Implements the list method.
*
* @ingroup ServiceMethod
*
@@ -7421,7 +9361,7 @@ class PropertiesResource_UpdateMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive.file
* https://www.googleapis.com/auth/drive.readonly
*/
-class RealtimeResource_GetMethod : public DriveServiceBaseRequest {
+class RepliesResource_ListMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7429,47 +9369,114 @@ class RealtimeResource_GetMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file that the Realtime API data model is
- * associated with.
+ * @param[in] file_id The ID of the file.
+ * @param[in] comment_id The ID of the comment.
*/
- RealtimeResource_GetMethod(
+ RepliesResource_ListMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
+ const StringPiece& file_id,
+ const StringPiece& comment_id);
/**
* Standard destructor.
*/
- virtual ~RealtimeResource_GetMethod();
+ virtual ~RepliesResource_ListMethod();
/**
- * Clears the 'revision ' attribute so it is no longer set.
+ * Clears the 'includeDeleted ' attribute so it is no longer
+ * set.
+ */
+ void clear_include_deleted() {
+ _have_include_deleted_ = false;
+ client::ClearCppValueHelper(&include_deleted_);
+ }
+
+
+ /**
+ * Gets the optional 'includeDeleted ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ bool get_include_deleted() const { return include_deleted_; }
+
+ /**
+ * Sets the 'includeDeleted ' attribute.
+ *
+ * @param[in] value If set, all replies, including deleted replies (with
+ * content stripped) will be returned.
+ */
+ void set_include_deleted(bool value) {
+ _have_include_deleted_ = true;
+ include_deleted_ = value;
+ }
+
+ /**
+ * Clears the 'maxResults ' attribute so it is no longer set.
+ */
+ void clear_max_results() {
+ _have_max_results_ = false;
+ client::ClearCppValueHelper(&max_results_);
+ }
+
+
+ /**
+ * Gets the optional 'maxResults ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ int32 get_max_results() const { return max_results_; }
+
+ /**
+ * Sets the 'maxResults ' attribute.
+ *
+ * @param[in] value The maximum number of replies to include in the
+ * response, used for paging.
+ */
+ void set_max_results(int32 value) {
+ _have_max_results_ = true;
+ max_results_ = value;
+ }
+
+ /**
+ * Clears the 'pageToken ' attribute so it is no longer set.
*/
- void clear_revision() {
- _have_revision_ = false;
- client::ClearCppValueHelper(&revision_);
+ void clear_page_token() {
+ _have_page_token_ = false;
+ client::ClearCppValueHelper(&page_token_);
}
/**
- * Gets the optional 'revision ' attribute.
+ * Gets the optional 'pageToken ' attribute.
*
* If the value is not set then the default value will be returned.
*/
- int32 get_revision() const { return revision_; }
+ const string& get_page_token() const { return page_token_; }
/**
- * Sets the 'revision ' attribute.
+ * Gets a modifiable pointer to the optional pageToken '
+ * attribute.
*
- * @param[in] value The revision of the Realtime API data model to export.
- * Revisions start at 1 (the initial empty data model) and are incremented
- * with each change. If this parameter is excluded, the most recent data
- * model will be returned.
+ * @return The value can be set by dereferencing the pointer.
*/
- void set_revision(int32 value) {
- _have_revision_ = true;
- revision_ = value;
+ string* mutable_pageToken() {
+ _have_page_token_ = true;
+ return &page_token_;
+ }
+
+
+ /**
+ * Sets the 'pageToken ' attribute.
+ *
+ * @param[in] value The continuation token, used to page through large
+ * result sets. To get the next page of results, set this parameter to the
+ * value of "nextPageToken" from the previous response.
+ */
+ void set_page_token(const string& value) {
+ _have_page_token_ = true;
+ page_token_ = value;
}
/**
@@ -7495,32 +9502,39 @@ class RealtimeResource_GetMethod : public DriveServiceBaseRequest {
/**
- * Determine if the request should use Media Download for the response.
+ * Executes the method and parses the response into a data object on success.
*
- * @return true for media download, false otherwise.
- */
- bool get_use_media_download() const {
- return DriveServiceBaseRequest::get_use_media_download();
- }
-
- /**
- * Sets whether Media Download should be used for the response data.
+ * @param[out] data Loads from the response payload JSON data on success.
*
- * @param[in] use true to use media download, false otherwise.
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
*/
- void set_use_media_download(bool use) {
- DriveServiceBaseRequest::set_use_media_download(use);
+ util::Status ExecuteAndParseResponse(
+ CommentReplyList* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- int32 revision_;
- bool _have_revision_ : 1;
- DISALLOW_COPY_AND_ASSIGN(RealtimeResource_GetMethod);
+ string comment_id_;
+ bool include_deleted_;
+ int32 max_results_;
+ string page_token_;
+ bool _have_include_deleted_ : 1;
+ bool _have_max_results_ : 1;
+ bool _have_page_token_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(RepliesResource_ListMethod);
};
+typedef client::ServiceRequestPager<
+ RepliesResource_ListMethod,
+ CommentReplyList>
+ RepliesResource_ListMethodPager;
+
/**
- * Implements the update method.
+ * Implements the patch method.
*
* @ingroup ServiceMethod
*
@@ -7532,7 +9546,7 @@ class RealtimeResource_GetMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.file
*/
-class RealtimeResource_UpdateMethod : public DriveServiceBaseRequest {
+class RepliesResource_PatchMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7540,68 +9554,24 @@ class RealtimeResource_UpdateMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file that the Realtime API data model is
- * associated with.
- * @param[in] _media_content_type_ The content type of the data in the
- * _media_content_reader_.
- * @param[in] _media_content_reader_ The media content to update. If
- * this is NULL then do not upload any media and ignore
- * _media_content_type_.
+ * @param[in] file_id The ID of the file.
+ * @param[in] comment_id The ID of the comment.
+ * @param[in] reply_id The ID of the reply.
+ * @param[in] _content_ The data object to patch.
*/
- RealtimeResource_UpdateMethod(
+ RepliesResource_PatchMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& _media_content_type_,
- client::DataReader* _media_content_reader_);
+ const StringPiece& comment_id,
+ const StringPiece& reply_id,
+ const CommentReply& _content_);
/**
* Standard destructor.
*/
- virtual ~RealtimeResource_UpdateMethod();
-
-
- /**
- * Clears the 'baseRevision ' attribute so it is no longer set.
- */
- void clear_base_revision() {
- _have_base_revision_ = false;
- client::ClearCppValueHelper(&base_revision_);
- }
-
-
- /**
- * Gets the optional 'baseRevision ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- const string& get_base_revision() const { return base_revision_; }
-
- /**
- * Gets a modifiable pointer to the optional baseRevision '
- * attribute.
- *
- * @return The value can be set by dereferencing the pointer.
- */
- string* mutable_baseRevision() {
- _have_base_revision_ = true;
- return &base_revision_;
- }
-
+ virtual ~RepliesResource_PatchMethod();
- /**
- * Sets the 'baseRevision ' attribute.
- *
- * @param[in] value The revision of the model to diff the uploaded model
- * against. If set, the uploaded model is diffed against the provided
- * revision and those differences are merged with any changes made to the
- * model after the provided revision. If not set, the uploaded model
- * replaces the current model on the server.
- */
- void set_base_revision(const string& value) {
- _have_base_revision_ = true;
- base_revision_ = value;
- }
/**
* Appends variable value to the target string.
@@ -7617,39 +9587,31 @@ class RealtimeResource_UpdateMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
- /**
- * Appends the optional query parameters to the target URL.
- *
- * @param[in, out] target The URL string to append to.
- */
- virtual util::Status AppendOptionalQueryParameters(string* target);
-
-
-
- /**
- * Returns MediaUploader for uploading the content.
- */
/**
- * Returns the specification for media upload using the simple protocol.
- */
- static const client::MediaUploadSpec SIMPLE_MEDIA_UPLOAD;
- /**
- * Returns the specification for media upload using the resumable protocol.
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
*/
- static const client::MediaUploadSpec RESUMABLE_MEDIA_UPLOAD;
+ util::Status ExecuteAndParseResponse(
+ CommentReply* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
private:
string file_id_;
- string base_revision_;
- bool _have_base_revision_ : 1;
- DISALLOW_COPY_AND_ASSIGN(RealtimeResource_UpdateMethod);
+ string comment_id_;
+ string reply_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(RepliesResource_PatchMethod);
};
-
-
/**
- * Implements the delete method.
+ * Implements the update method.
*
* @ingroup ServiceMethod
*
@@ -7661,7 +9623,7 @@ class RealtimeResource_UpdateMethod : public DriveServiceBaseRequest {
* https://www.googleapis.com/auth/drive
* https://www.googleapis.com/auth/drive.file
*/
-class RepliesResource_DeleteMethod : public DriveServiceBaseRequest {
+class RepliesResource_UpdateMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7672,18 +9634,20 @@ class RepliesResource_DeleteMethod : public DriveServiceBaseRequest {
* @param[in] file_id The ID of the file.
* @param[in] comment_id The ID of the comment.
* @param[in] reply_id The ID of the reply.
+ * @param[in] _content_ The data object to update.
*/
- RepliesResource_DeleteMethod(
+ RepliesResource_UpdateMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
const StringPiece& comment_id,
- const StringPiece& reply_id);
+ const StringPiece& reply_id,
+ const CommentReply& _content_);
/**
* Standard destructor.
*/
- virtual ~RepliesResource_DeleteMethod();
+ virtual ~RepliesResource_UpdateMethod();
/**
@@ -7701,15 +9665,32 @@ class RepliesResource_DeleteMethod : public DriveServiceBaseRequest {
string* target);
+ /**
+ * Executes the method and parses the response into a data object on success.
+ *
+ * @param[out] data Loads from the response payload JSON data on success.
+ *
+ * @return Success if an HTTP 2xx response was received. Otherwise the
+ * status indicates the reason for failure. Finer detail may be
+ * available from the underlying http_request to distinguish the
+ * transport_status from the overal HTTP request status.
+ */
+ util::Status ExecuteAndParseResponse(
+ CommentReply* data) {
+ return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
+ }
+
private:
string file_id_;
string comment_id_;
- string reply_id_;
- DISALLOW_COPY_AND_ASSIGN(RepliesResource_DeleteMethod);
+ string reply_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(RepliesResource_UpdateMethod);
};
+
+
/**
- * Implements the get method.
+ * Implements the delete method.
*
* @ingroup ServiceMethod
*
@@ -7719,10 +9700,10 @@ class RepliesResource_DeleteMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.readonly
*/
-class RepliesResource_GetMethod : public DriveServiceBaseRequest {
+class RevisionsResource_DeleteMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7731,49 +9712,19 @@ class RepliesResource_GetMethod : public DriveServiceBaseRequest {
* In practice this is supplied by the user code that is
* creating the method instance.
* @param[in] file_id The ID of the file.
- * @param[in] comment_id The ID of the comment.
- * @param[in] reply_id The ID of the reply.
+ * @param[in] revision_id The ID of the revision.
*/
- RepliesResource_GetMethod(
+ RevisionsResource_DeleteMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& comment_id,
- const StringPiece& reply_id);
+ const StringPiece& revision_id);
/**
* Standard destructor.
- */
- virtual ~RepliesResource_GetMethod();
-
-
- /**
- * Clears the 'includeDeleted ' attribute so it is no longer
- * set.
- */
- void clear_include_deleted() {
- _have_include_deleted_ = false;
- client::ClearCppValueHelper(&include_deleted_);
- }
-
-
- /**
- * Gets the optional 'includeDeleted ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_include_deleted() const { return include_deleted_; }
-
- /**
- * Sets the 'includeDeleted ' attribute.
- *
- * @param[in] value If set, this will succeed when retrieving a deleted
- * reply.
- */
- void set_include_deleted(bool value) {
- _have_include_deleted_ = true;
- include_deleted_ = value;
- }
+ */
+ virtual ~RevisionsResource_DeleteMethod();
+
/**
* Appends variable value to the target string.
@@ -7789,40 +9740,15 @@ class RepliesResource_GetMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
- /**
- * Appends the optional query parameters to the target URL.
- *
- * @param[in, out] target The URL string to append to.
- */
- virtual util::Status AppendOptionalQueryParameters(string* target);
-
-
- /**
- * Executes the method and parses the response into a data object on success.
- *
- * @param[out] data Loads from the response payload JSON data on success.
- *
- * @return Success if an HTTP 2xx response was received. Otherwise the
- * status indicates the reason for failure. Finer detail may be
- * available from the underlying http_request to distinguish the
- * transport_status from the overal HTTP request status.
- */
- util::Status ExecuteAndParseResponse(
- CommentReply* data) {
- return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
- }
private:
string file_id_;
- string comment_id_;
- string reply_id_;
- bool include_deleted_;
- bool _have_include_deleted_ : 1;
- DISALLOW_COPY_AND_ASSIGN(RepliesResource_GetMethod);
+ string revision_id_;
+ DISALLOW_COPY_AND_ASSIGN(RevisionsResource_DeleteMethod);
};
/**
- * Implements the insert method.
+ * Implements the get method.
*
* @ingroup ServiceMethod
*
@@ -7832,9 +9758,14 @@ class RepliesResource_GetMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
+ * https://www.googleapis.com/auth/drive.readonly
*/
-class RepliesResource_InsertMethod : public DriveServiceBaseRequest {
+class RevisionsResource_GetMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7843,20 +9774,18 @@ class RepliesResource_InsertMethod : public DriveServiceBaseRequest {
* In practice this is supplied by the user code that is
* creating the method instance.
* @param[in] file_id The ID of the file.
- * @param[in] comment_id The ID of the comment.
- * @param[in] _content_ The data object to insert.
+ * @param[in] revision_id The ID of the revision.
*/
- RepliesResource_InsertMethod(
+ RevisionsResource_GetMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& comment_id,
- const CommentReply& _content_);
+ const StringPiece& revision_id);
/**
* Standard destructor.
*/
- virtual ~RepliesResource_InsertMethod();
+ virtual ~RevisionsResource_GetMethod();
/**
@@ -7885,14 +9814,14 @@ class RepliesResource_InsertMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- CommentReply* data) {
+ Revision* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- string comment_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(RepliesResource_InsertMethod);
+ string revision_id_;
+ DISALLOW_COPY_AND_ASSIGN(RevisionsResource_GetMethod);
};
/**
@@ -7906,10 +9835,14 @@ class RepliesResource_InsertMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.metadata
+ * https://www.googleapis.com/auth/drive.metadata.readonly
+ * https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class RepliesResource_ListMethod : public DriveServiceBaseRequest {
+class RevisionsResource_ListMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -7918,20 +9851,44 @@ class RepliesResource_ListMethod : public DriveServiceBaseRequest {
* In practice this is supplied by the user code that is
* creating the method instance.
* @param[in] file_id The ID of the file.
- * @param[in] comment_id The ID of the comment.
*/
- RepliesResource_ListMethod(
+ RevisionsResource_ListMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& comment_id);
+ const StringPiece& file_id);
/**
* Standard destructor.
*/
- virtual ~RepliesResource_ListMethod();
+ virtual ~RevisionsResource_ListMethod();
+
+
+ /**
+ * Clears the 'maxResults ' attribute so it is no longer set.
+ */
+ void clear_max_results() {
+ _have_max_results_ = false;
+ client::ClearCppValueHelper(&max_results_);
+ }
+ /**
+ * Gets the optional 'maxResults ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ int32 get_max_results() const { return max_results_; }
+
+ /**
+ * Sets the 'maxResults ' attribute.
+ *
+ * @param[in] value Maximum number of revisions to return.
+ */
+ void set_max_results(int32 value) {
+ _have_max_results_ = true;
+ max_results_ = value;
+ }
+
/**
* Clears the 'pageToken ' attribute so it is no longer set.
*/
@@ -7963,72 +9920,15 @@ class RepliesResource_ListMethod : public DriveServiceBaseRequest {
/**
* Sets the 'pageToken ' attribute.
*
- * @param[in] value The continuation token, used to page through large
- * result sets. To get the next page of results, set this parameter to the
- * value of "nextPageToken" from the previous response.
+ * @param[in] value Page token for revisions. To get the next page of
+ * results, set this parameter to the value of "nextPageToken" from the
+ * previous response.
*/
void set_page_token(const string& value) {
_have_page_token_ = true;
page_token_ = value;
}
-
-
- /**
- * Clears the 'includeDeleted ' attribute so it is no longer
- * set.
- */
- void clear_include_deleted() {
- _have_include_deleted_ = false;
- client::ClearCppValueHelper(&include_deleted_);
- }
-
-
- /**
- * Gets the optional 'includeDeleted ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- bool get_include_deleted() const { return include_deleted_; }
-
- /**
- * Sets the 'includeDeleted ' attribute.
- *
- * @param[in] value If set, all replies, including deleted replies (with
- * content stripped) will be returned.
- */
- void set_include_deleted(bool value) {
- _have_include_deleted_ = true;
- include_deleted_ = value;
- }
-
- /**
- * Clears the 'maxResults ' attribute so it is no longer set.
- */
- void clear_max_results() {
- _have_max_results_ = false;
- client::ClearCppValueHelper(&max_results_);
- }
-
-
- /**
- * Gets the optional 'maxResults ' attribute.
- *
- * If the value is not set then the default value will be returned.
- */
- int32 get_max_results() const { return max_results_; }
-
- /**
- * Sets the 'maxResults ' attribute.
- *
- * @param[in] value The maximum number of replies to include in the
- * response, used for paging.
- */
- void set_max_results(int32 value) {
- _have_max_results_ = true;
- max_results_ = value;
- }
-
/**
* Appends variable value to the target string.
*
@@ -8062,26 +9962,23 @@ class RepliesResource_ListMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- CommentReplyList* data) {
+ RevisionList* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- string comment_id_;
- string page_token_;
- bool include_deleted_;
int32 max_results_;
- bool _have_page_token_ : 1;
- bool _have_include_deleted_ : 1;
+ string page_token_;
bool _have_max_results_ : 1;
- DISALLOW_COPY_AND_ASSIGN(RepliesResource_ListMethod);
+ bool _have_page_token_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(RevisionsResource_ListMethod);
};
typedef client::ServiceRequestPager<
- RepliesResource_ListMethod,
- CommentReplyList>
- RepliesResource_ListMethodPager;
+ RevisionsResource_ListMethod,
+ RevisionList>
+ RevisionsResource_ListMethodPager;
/**
* Implements the patch method.
@@ -8094,9 +9991,10 @@ typedef client::ServiceRequestPager<
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
*/
-class RepliesResource_PatchMethod : public DriveServiceBaseRequest {
+class RevisionsResource_PatchMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -8104,23 +10002,21 @@ class RepliesResource_PatchMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] comment_id The ID of the comment.
- * @param[in] reply_id The ID of the reply.
+ * @param[in] file_id The ID for the file.
+ * @param[in] revision_id The ID for the revision.
* @param[in] _content_ The data object to patch.
*/
- RepliesResource_PatchMethod(
+ RevisionsResource_PatchMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& comment_id,
- const StringPiece& reply_id,
- const CommentReply& _content_);
+ const StringPiece& revision_id,
+ const Revision& _content_);
/**
* Standard destructor.
*/
- virtual ~RepliesResource_PatchMethod();
+ virtual ~RevisionsResource_PatchMethod();
/**
@@ -8149,15 +10045,14 @@ class RepliesResource_PatchMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- CommentReply* data) {
+ Revision* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- string comment_id_;
- string reply_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(RepliesResource_PatchMethod);
+ string revision_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(RevisionsResource_PatchMethod);
};
/**
@@ -8171,9 +10066,10 @@ class RepliesResource_PatchMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
+ * https://www.googleapis.com/auth/drive.appdata
* https://www.googleapis.com/auth/drive.file
*/
-class RepliesResource_UpdateMethod : public DriveServiceBaseRequest {
+class RevisionsResource_UpdateMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -8181,23 +10077,21 @@ class RepliesResource_UpdateMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] comment_id The ID of the comment.
- * @param[in] reply_id The ID of the reply.
+ * @param[in] file_id The ID for the file.
+ * @param[in] revision_id The ID for the revision.
* @param[in] _content_ The data object to update.
*/
- RepliesResource_UpdateMethod(
+ RevisionsResource_UpdateMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
const StringPiece& file_id,
- const StringPiece& comment_id,
- const StringPiece& reply_id,
- const CommentReply& _content_);
+ const StringPiece& revision_id,
+ const Revision& _content_);
/**
* Standard destructor.
*/
- virtual ~RepliesResource_UpdateMethod();
+ virtual ~RevisionsResource_UpdateMethod();
/**
@@ -8226,15 +10120,14 @@ class RepliesResource_UpdateMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- CommentReply* data) {
+ Revision* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
string file_id_;
- string comment_id_;
- string reply_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(RepliesResource_UpdateMethod);
+ string revision_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(RevisionsResource_UpdateMethod);
};
@@ -8250,10 +10143,8 @@ class RepliesResource_UpdateMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.file
*/
-class RevisionsResource_DeleteMethod : public DriveServiceBaseRequest {
+class TeamdrivesResource_DeleteMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -8261,19 +10152,17 @@ class RevisionsResource_DeleteMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] revision_id The ID of the revision.
+ * @param[in] team_drive_id The ID of the Team Drive.
*/
- RevisionsResource_DeleteMethod(
+ TeamdrivesResource_DeleteMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& revision_id);
+ const StringPiece& team_drive_id);
/**
* Standard destructor.
*/
- virtual ~RevisionsResource_DeleteMethod();
+ virtual ~TeamdrivesResource_DeleteMethod();
/**
@@ -8292,9 +10181,8 @@ class RevisionsResource_DeleteMethod : public DriveServiceBaseRequest {
private:
- string file_id_;
- string revision_id_;
- DISALLOW_COPY_AND_ASSIGN(RevisionsResource_DeleteMethod);
+ string team_drive_id_;
+ DISALLOW_COPY_AND_ASSIGN(TeamdrivesResource_DeleteMethod);
};
/**
@@ -8308,14 +10196,9 @@ class RevisionsResource_DeleteMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
* https://www.googleapis.com/auth/drive.readonly
*/
-class RevisionsResource_GetMethod : public DriveServiceBaseRequest {
+class TeamdrivesResource_GetMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -8323,19 +10206,17 @@ class RevisionsResource_GetMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
- * @param[in] revision_id The ID of the revision.
+ * @param[in] team_drive_id The ID of the Team Drive.
*/
- RevisionsResource_GetMethod(
+ TeamdrivesResource_GetMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& revision_id);
+ const StringPiece& team_drive_id);
/**
* Standard destructor.
*/
- virtual ~RevisionsResource_GetMethod();
+ virtual ~TeamdrivesResource_GetMethod();
/**
@@ -8364,18 +10245,17 @@ class RevisionsResource_GetMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Revision* data) {
+ TeamDrive* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_;
- string revision_id_;
- DISALLOW_COPY_AND_ASSIGN(RevisionsResource_GetMethod);
+ string team_drive_id_;
+ DISALLOW_COPY_AND_ASSIGN(TeamdrivesResource_GetMethod);
};
/**
- * Implements the list method.
+ * Implements the insert method.
*
* @ingroup ServiceMethod
*
@@ -8385,14 +10265,8 @@ class RevisionsResource_GetMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.file
- * https://www.googleapis.com/auth/drive.metadata
- * https://www.googleapis.com/auth/drive.metadata.readonly
- * https://www.googleapis.com/auth/drive.photos.readonly
- * https://www.googleapis.com/auth/drive.readonly
*/
-class RevisionsResource_ListMethod : public DriveServiceBaseRequest {
+class TeamdrivesResource_InsertMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -8400,17 +10274,23 @@ class RevisionsResource_ListMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID of the file.
+ * @param[in] request_id An ID, such as a random UUID, which uniquely
+ * identifies this user's request for idempotent creation of a Team Drive. A
+ * repeated request by the same user and with the same request ID will avoid
+ * creating duplicates by attempting to create the same Team Drive. If the
+ * Team Drive already exists a 409 error will be returned.
+ * @param[in] _content_ The data object to insert.
*/
- RevisionsResource_ListMethod(
+ TeamdrivesResource_InsertMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id);
+ const StringPiece& request_id,
+ const TeamDrive& _content_);
/**
* Standard destructor.
*/
- virtual ~RevisionsResource_ListMethod();
+ virtual ~TeamdrivesResource_InsertMethod();
/**
@@ -8427,6 +10307,13 @@ class RevisionsResource_ListMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
/**
* Executes the method and parses the response into a data object on success.
@@ -8439,17 +10326,17 @@ class RevisionsResource_ListMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- RevisionList* data) {
+ TeamDrive* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_;
- DISALLOW_COPY_AND_ASSIGN(RevisionsResource_ListMethod);
+ string request_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(TeamdrivesResource_InsertMethod);
};
/**
- * Implements the patch method.
+ * Implements the list method.
*
* @ingroup ServiceMethod
*
@@ -8459,10 +10346,9 @@ class RevisionsResource_ListMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.file
+ * https://www.googleapis.com/auth/drive.readonly
*/
-class RevisionsResource_PatchMethod : public DriveServiceBaseRequest {
+class TeamdrivesResource_ListMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -8470,23 +10356,81 @@ class RevisionsResource_PatchMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file.
- * @param[in] revision_id The ID for the revision.
- * @param[in] _content_ The data object to patch.
*/
- RevisionsResource_PatchMethod(
+ TeamdrivesResource_ListMethod(
const DriveService* _service_,
- client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& revision_id,
- const Revision& _content_);
+ client::AuthorizationCredential* _credential_);
/**
* Standard destructor.
*/
- virtual ~RevisionsResource_PatchMethod();
+ virtual ~TeamdrivesResource_ListMethod();
+
+
+ /**
+ * Clears the 'maxResults ' attribute so it is no longer set.
+ */
+ void clear_max_results() {
+ _have_max_results_ = false;
+ client::ClearCppValueHelper(&max_results_);
+ }
+
+
+ /**
+ * Gets the optional 'maxResults ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ int32 get_max_results() const { return max_results_; }
+
+ /**
+ * Sets the 'maxResults ' attribute.
+ *
+ * @param[in] value Maximum number of Team Drives to return.
+ */
+ void set_max_results(int32 value) {
+ _have_max_results_ = true;
+ max_results_ = value;
+ }
+
+ /**
+ * Clears the 'pageToken ' attribute so it is no longer set.
+ */
+ void clear_page_token() {
+ _have_page_token_ = false;
+ client::ClearCppValueHelper(&page_token_);
+ }
+ /**
+ * Gets the optional 'pageToken ' attribute.
+ *
+ * If the value is not set then the default value will be returned.
+ */
+ const string& get_page_token() const { return page_token_; }
+
+ /**
+ * Gets a modifiable pointer to the optional pageToken '
+ * attribute.
+ *
+ * @return The value can be set by dereferencing the pointer.
+ */
+ string* mutable_pageToken() {
+ _have_page_token_ = true;
+ return &page_token_;
+ }
+
+
+ /**
+ * Sets the 'pageToken ' attribute.
+ *
+ * @param[in] value Page token for Team Drives.
+ */
+ void set_page_token(const string& value) {
+ _have_page_token_ = true;
+ page_token_ = value;
+ }
+
/**
* Appends variable value to the target string.
*
@@ -8501,6 +10445,13 @@ class RevisionsResource_PatchMethod : public DriveServiceBaseRequest {
const client::UriTemplateConfig& config,
string* target);
+ /**
+ * Appends the optional query parameters to the target URL.
+ *
+ * @param[in, out] target The URL string to append to.
+ */
+ virtual util::Status AppendOptionalQueryParameters(string* target);
+
/**
* Executes the method and parses the response into a data object on success.
@@ -8513,16 +10464,23 @@ class RevisionsResource_PatchMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Revision* data) {
+ TeamDriveList* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_;
- string revision_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(RevisionsResource_PatchMethod);
+ int32 max_results_;
+ string page_token_;
+ bool _have_max_results_ : 1;
+ bool _have_page_token_ : 1;
+ DISALLOW_COPY_AND_ASSIGN(TeamdrivesResource_ListMethod);
};
+typedef client::ServiceRequestPager<
+ TeamdrivesResource_ListMethod,
+ TeamDriveList>
+ TeamdrivesResource_ListMethodPager;
+
/**
* Implements the update method.
*
@@ -8534,10 +10492,8 @@ class RevisionsResource_PatchMethod : public DriveServiceBaseRequest {
*
* One or more of these authorization scopes are required for this method:
* https://www.googleapis.com/auth/drive
- * https://www.googleapis.com/auth/drive.appdata
- * https://www.googleapis.com/auth/drive.file
*/
-class RevisionsResource_UpdateMethod : public DriveServiceBaseRequest {
+class TeamdrivesResource_UpdateMethod : public DriveServiceBaseRequest {
public:
/**
* The standard constructor takes all the required method parameters.
@@ -8545,21 +10501,19 @@ class RevisionsResource_UpdateMethod : public DriveServiceBaseRequest {
* @param[in] _credential_ If not NULL, the credential to authorize with.
* In practice this is supplied by the user code that is
* creating the method instance.
- * @param[in] file_id The ID for the file.
- * @param[in] revision_id The ID for the revision.
+ * @param[in] team_drive_id The ID of the Team Drive.
* @param[in] _content_ The data object to update.
*/
- RevisionsResource_UpdateMethod(
+ TeamdrivesResource_UpdateMethod(
const DriveService* _service_,
client::AuthorizationCredential* _credential_,
- const StringPiece& file_id,
- const StringPiece& revision_id,
- const Revision& _content_);
+ const StringPiece& team_drive_id,
+ const TeamDrive& _content_);
/**
* Standard destructor.
*/
- virtual ~RevisionsResource_UpdateMethod();
+ virtual ~TeamdrivesResource_UpdateMethod();
/**
@@ -8588,14 +10542,13 @@ class RevisionsResource_UpdateMethod : public DriveServiceBaseRequest {
* transport_status from the overal HTTP request status.
*/
util::Status ExecuteAndParseResponse(
- Revision* data) {
+ TeamDrive* data) {
return DriveServiceBaseRequest::ExecuteAndParseResponse(data);
}
private:
- string file_id_;
- string revision_id_; string _content_;
- DISALLOW_COPY_AND_ASSIGN(RevisionsResource_UpdateMethod);
+ string team_drive_id_; string _content_;
+ DISALLOW_COPY_AND_ASSIGN(TeamdrivesResource_UpdateMethod);
};
@@ -8613,17 +10566,17 @@ class DriveService : public client::ClientService {
/**
* The name of the API that this was generated from.
*/
- static const StringPiece googleapis_API_NAME;
+ static const char googleapis_API_NAME[];
/**
* The version of the API that this interface was generated from.
*/
- static const StringPiece googleapis_API_VERSION;
+ static const char googleapis_API_VERSION[];
/**
* The code generator used to generate this API.
*/
- static const StringPiece googleapis_API_GENERATOR;
+ static const char googleapis_API_GENERATOR[];
/**
@@ -8752,6 +10705,17 @@ class DriveService : public client::ClientService {
client::AuthorizationCredential* _credential_,
const StringPiece& change_id) const;
+ /**
+ * Creates a new ChangesResource_GetStartPageTokenMethod instance.
+ *
+ * @param[in] _credential_ Can be NULL.
+ * NULL credentials will not authorize the request.
+ * @returns The caller should Execute the method instance,
+ * then destroy it when they are finished.
+ */
+ ChangesResource_GetStartPageTokenMethod* NewGetStartPageTokenMethod(
+ client::AuthorizationCredential* _credential_) const;
+
/**
* Creates a new ChangesResource_ListMethod instance.
*
@@ -9123,6 +11087,22 @@ class DriveService : public client::ClientService {
FilesResource_EmptyTrashMethod* NewEmptyTrashMethod(
client::AuthorizationCredential* _credential_) const;
+ /**
+ * Creates a new FilesResource_ExportMethod instance.
+ *
+ * @param[in] _credential_ Can be NULL.
+ * NULL credentials will not authorize the request.
+ * @param[in] file_id The ID of the file.
+ * @param[in] mime_type The MIME type of the format requested for this
+ * export.
+ * @returns The caller should Execute the method instance,
+ * then destroy it when they are finished.
+ */
+ FilesResource_ExportMethod* NewExportMethod(
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id,
+ const StringPiece& mime_type) const;
+
/**
* Creates a new FilesResource_GenerateIdsMethod instance.
*
@@ -9429,7 +11409,7 @@ class DriveService : public client::ClientService {
*
* @param[in] _credential_ Can be NULL.
* NULL credentials will not authorize the request.
- * @param[in] file_id The ID for the file.
+ * @param[in] file_id The ID for the file or Team Drive.
* @param[in] permission_id The ID for the permission.
* @returns The caller should Execute the method instance,
* then destroy it when they are finished.
@@ -9444,7 +11424,7 @@ class DriveService : public client::ClientService {
*
* @param[in] _credential_ Can be NULL.
* NULL credentials will not authorize the request.
- * @param[in] file_id The ID for the file.
+ * @param[in] file_id The ID for the file or Team Drive.
* @param[in] permission_id The ID for the permission.
* @returns The caller should Execute the method instance,
* then destroy it when they are finished.
@@ -9472,7 +11452,7 @@ class DriveService : public client::ClientService {
*
* @param[in] _credential_ Can be NULL.
* NULL credentials will not authorize the request.
- * @param[in] file_id The ID for the file.
+ * @param[in] file_id The ID for the file or Team Drive.
* @param[in] _content_ The data object to insert.
* @returns The caller should Execute the method instance,
* then destroy it when they are finished.
@@ -9487,7 +11467,7 @@ class DriveService : public client::ClientService {
*
* @param[in] _credential_ Can be NULL.
* NULL credentials will not authorize the request.
- * @param[in] file_id The ID for the file.
+ * @param[in] file_id The ID for the file or Team Drive.
* @returns The caller should Execute the method instance,
* then destroy it when they are finished.
*/
@@ -9495,12 +11475,24 @@ class DriveService : public client::ClientService {
client::AuthorizationCredential* _credential_,
const StringPiece& file_id) const;
+ /**
+ * Creates a pager for iterating over incremental result pages.
+ * @param[in] _credential_ NULL credentials will not authorize the request.
+ * @param[in] file_id The ID for the file or Team Drive.
+ *
+ *
+ * @see googleapis::googleapis::ServiceRequestPager
+ */
+ PermissionsResource_ListMethodPager* NewListMethodPager(
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id) const;
+
/**
* Creates a new PermissionsResource_PatchMethod instance.
*
* @param[in] _credential_ Can be NULL.
* NULL credentials will not authorize the request.
- * @param[in] file_id The ID for the file.
+ * @param[in] file_id The ID for the file or Team Drive.
* @param[in] permission_id The ID for the permission.
* @param[in] _content_ The data object to patch.
* @returns The caller should Execute the method instance,
@@ -9517,7 +11509,7 @@ class DriveService : public client::ClientService {
*
* @param[in] _credential_ Can be NULL.
* NULL credentials will not authorize the request.
- * @param[in] file_id The ID for the file.
+ * @param[in] file_id The ID for the file or Team Drive.
* @param[in] permission_id The ID for the permission.
* @param[in] _content_ The data object to update.
* @returns The caller should Execute the method instance,
@@ -9930,6 +11922,18 @@ class DriveService : public client::ClientService {
client::AuthorizationCredential* _credential_,
const StringPiece& file_id) const;
+ /**
+ * Creates a pager for iterating over incremental result pages.
+ * @param[in] _credential_ NULL credentials will not authorize the request.
+ * @param[in] file_id The ID of the file.
+ *
+ *
+ * @see googleapis::googleapis::ServiceRequestPager
+ */
+ RevisionsResource_ListMethodPager* NewListMethodPager(
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& file_id) const;
+
/**
* Creates a new RevisionsResource_PatchMethod instance.
*
@@ -9970,6 +11974,114 @@ class DriveService : public client::ClientService {
DISALLOW_COPY_AND_ASSIGN(RevisionsResource);
};
+ /**
+ * Acts as message factory for accessing data.
+ *
+ * @ingroup ServiceClass
+ */
+ class TeamdrivesResource {
+ public:
+ /**
+ * Standard constructor.
+ *
+ * @param[in] service The service instance is used to bind to the
+ * methods created from this resource instance. This will be
+ * the service that methods are invoked on.
+ */
+ explicit TeamdrivesResource(DriveService* service);
+
+ /**
+ * Standard destructor.
+ */
+ ~TeamdrivesResource() {}
+
+
+ /**
+ * Creates a new TeamdrivesResource_DeleteMethod instance.
+ *
+ * @param[in] _credential_ Can be NULL.
+ * NULL credentials will not authorize the request.
+ * @param[in] team_drive_id The ID of the Team Drive.
+ * @returns The caller should Execute the method instance,
+ * then destroy it when they are finished.
+ */
+ TeamdrivesResource_DeleteMethod* NewDeleteMethod(
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& team_drive_id) const;
+
+ /**
+ * Creates a new TeamdrivesResource_GetMethod instance.
+ *
+ * @param[in] _credential_ Can be NULL.
+ * NULL credentials will not authorize the request.
+ * @param[in] team_drive_id The ID of the Team Drive.
+ * @returns The caller should Execute the method instance,
+ * then destroy it when they are finished.
+ */
+ TeamdrivesResource_GetMethod* NewGetMethod(
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& team_drive_id) const;
+
+ /**
+ * Creates a new TeamdrivesResource_InsertMethod instance.
+ *
+ * @param[in] _credential_ Can be NULL.
+ * NULL credentials will not authorize the request.
+ * @param[in] request_id An ID, such as a random UUID, which uniquely
+ * identifies this user's request for idempotent creation of a Team Drive. A
+ * repeated request by the same user and with the same request ID will avoid
+ * creating duplicates by attempting to create the same Team Drive. If the
+ * Team Drive already exists a 409 error will be returned.
+ * @param[in] _content_ The data object to insert.
+ * @returns The caller should Execute the method instance,
+ * then destroy it when they are finished.
+ */
+ TeamdrivesResource_InsertMethod* NewInsertMethod(
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& request_id,
+ const TeamDrive& _content_) const;
+
+ /**
+ * Creates a new TeamdrivesResource_ListMethod instance.
+ *
+ * @param[in] _credential_ Can be NULL.
+ * NULL credentials will not authorize the request.
+ * @returns The caller should Execute the method instance,
+ * then destroy it when they are finished.
+ */
+ TeamdrivesResource_ListMethod* NewListMethod(
+ client::AuthorizationCredential* _credential_) const;
+
+ /**
+ * Creates a pager for iterating over incremental result pages.
+ * @param[in] _credential_ NULL credentials will not authorize the request.
+ *
+ * @see googleapis::googleapis::ServiceRequestPager
+ */
+ TeamdrivesResource_ListMethodPager* NewListMethodPager(
+ client::AuthorizationCredential* _credential_) const;
+
+ /**
+ * Creates a new TeamdrivesResource_UpdateMethod instance.
+ *
+ * @param[in] _credential_ Can be NULL.
+ * NULL credentials will not authorize the request.
+ * @param[in] team_drive_id The ID of the Team Drive.
+ * @param[in] _content_ The data object to update.
+ * @returns The caller should Execute the method instance,
+ * then destroy it when they are finished.
+ */
+ TeamdrivesResource_UpdateMethod* NewUpdateMethod(
+ client::AuthorizationCredential* _credential_,
+ const StringPiece& team_drive_id,
+ const TeamDrive& _content_) const;
+
+ private:
+ DriveService* service_;
+
+ DISALLOW_COPY_AND_ASSIGN(TeamdrivesResource);
+ };
+
/**
@@ -10114,6 +12226,16 @@ class DriveService : public client::ClientService {
return revisions_;
}
+
+ /**
+ * Gets the resource method factory.
+ *
+ * @return TeamdrivesResource for creating methods.
+ */
+ const TeamdrivesResource& get_teamdrives() const {
+ return teamdrives_;
+ }
+
/**
* Declares the OAuth2.0 scopes used within Drive API
*
@@ -10125,48 +12247,48 @@ class DriveService : public client::ClientService {
/**
* View and manage the files in your Google Drive.
*/
- static const string DRIVE;
+ static const char DRIVE[];
/**
* View and manage its own configuration data in your Google Drive.
*/
- static const string DRIVE_APPDATA;
+ static const char DRIVE_APPDATA[];
/**
* View your Google Drive apps.
*/
- static const string DRIVE_APPS_READONLY;
+ static const char DRIVE_APPS_READONLY[];
/**
* View and manage Google Drive files and folders that you have opened or
* created with this app.
*/
- static const string DRIVE_FILE;
+ static const char DRIVE_FILE[];
/**
* View and manage metadata of files in your Google Drive.
*/
- static const string DRIVE_METADATA;
+ static const char DRIVE_METADATA[];
/**
* View metadata for files in your Google Drive.
*/
- static const string DRIVE_METADATA_READONLY;
+ static const char DRIVE_METADATA_READONLY[];
/**
* View the photos, videos and albums in your Google Photos.
*/
- static const string DRIVE_PHOTOS_READONLY;
+ static const char DRIVE_PHOTOS_READONLY[];
/**
* View the files in your Google Drive.
*/
- static const string DRIVE_READONLY;
+ static const char DRIVE_READONLY[];
/**
* Modify your Google Apps Script scripts' behavior.
*/
- static const string DRIVE_SCRIPTS;
+ static const char DRIVE_SCRIPTS[];
private:
SCOPES(); // Never instantiated.
@@ -10187,6 +12309,7 @@ class DriveService : public client::ClientService {
RealtimeResource realtime_;
RepliesResource replies_;
RevisionsResource revisions_;
+ TeamdrivesResource teamdrives_;
DISALLOW_COPY_AND_ASSIGN(DriveService);
};
diff --git a/service_apis/drive/google/drive_api/file.cc b/service_apis/drive/google/drive_api/file.cc
index d38b31b..2ba876f 100644
--- a/service_apis/drive/google/drive_api/file.cc
+++ b/service_apis/drive/google/drive_api/file.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// File
// Documentation:
@@ -47,6 +44,27 @@ using namespace googleapis;
+// Object factory method (static).
+File::FileCapabilities* File::FileCapabilities::New() {
+ return new client::JsonCppCapsule;
+}
+
+// Standard immutable constructor.
+File::FileCapabilities::FileCapabilities(const Json::Value& storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard mutable constructor.
+File::FileCapabilities::FileCapabilities(Json::Value* storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard destructor.
+File::FileCapabilities::~FileCapabilities() {
+}
+
+// Properties.
+
// Object factory method (static).
File::FileImageMediaMetadata::FileImageMediaMetadataLocation* File::FileImageMediaMetadata::FileImageMediaMetadataLocation::New() {
@@ -66,6 +84,8 @@ File::FileImageMediaMetadata::FileImageMediaMetadataLocation::FileImageMediaMeta
// Standard destructor.
File::FileImageMediaMetadata::FileImageMediaMetadataLocation::~FileImageMediaMetadataLocation() {
}
+
+// Properties.
// Object factory method (static).
File::FileImageMediaMetadata* File::FileImageMediaMetadata::New() {
return new client::JsonCppCapsule;
@@ -85,6 +105,8 @@ File::FileImageMediaMetadata::FileImageMediaMetadata(Json::Value* storage)
File::FileImageMediaMetadata::~FileImageMediaMetadata() {
}
+// Properties.
+
// Object factory method (static).
File::FileIndexableText* File::FileIndexableText::New() {
return new client::JsonCppCapsule;
@@ -104,6 +126,8 @@ File::FileIndexableText::FileIndexableText(Json::Value* storage)
File::FileIndexableText::~FileIndexableText() {
}
+// Properties.
+
// Object factory method (static).
File::FileLabels* File::FileLabels::New() {
return new client::JsonCppCapsule;
@@ -123,6 +147,8 @@ File::FileLabels::FileLabels(Json::Value* storage)
File::FileLabels::~FileLabels() {
}
+// Properties.
+
// Object factory method (static).
File::FileThumbnail* File::FileThumbnail::New() {
return new client::JsonCppCapsule;
@@ -142,6 +168,8 @@ File::FileThumbnail::FileThumbnail(Json::Value* storage)
File::FileThumbnail::~FileThumbnail() {
}
+// Properties.
+
// Object factory method (static).
File::FileVideoMediaMetadata* File::FileVideoMediaMetadata::New() {
return new client::JsonCppCapsule;
@@ -160,6 +188,8 @@ File::FileVideoMediaMetadata::FileVideoMediaMetadata(Json::Value* storage)
// Standard destructor.
File::FileVideoMediaMetadata::~FileVideoMediaMetadata() {
}
+
+// Properties.
// Object factory method (static).
File* File::New() {
return new client::JsonCppCapsule;
@@ -178,4 +208,86 @@ File::File(Json::Value* storage)
// Standard destructor.
File::~File() {
}
+
+// Properties.
+
+const User File::get_last_modifying_user() const {
+ const Json::Value& storage = Storage("lastModifyingUser");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+User File::mutable_lastModifyingUser() {
+ Json::Value* storage = MutableStorage("lastModifyingUser");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const client::JsonCppArray File::get_owners() const {
+ const Json::Value& storage = Storage("owners");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray File::mutable_owners() {
+ Json::Value* storage = MutableStorage("owners");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
+
+const client::JsonCppArray File::get_parents() const {
+ const Json::Value& storage = Storage("parents");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray File::mutable_parents() {
+ Json::Value* storage = MutableStorage("parents");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
+
+const client::JsonCppArray File::get_permissions() const {
+ const Json::Value& storage = Storage("permissions");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray File::mutable_permissions() {
+ Json::Value* storage = MutableStorage("permissions");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
+
+const client::JsonCppArray File::get_properties() const {
+ const Json::Value& storage = Storage("properties");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray File::mutable_properties() {
+ Json::Value* storage = MutableStorage("properties");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
+
+const User File::get_sharing_user() const {
+ const Json::Value& storage = Storage("sharingUser");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+User File::mutable_sharingUser() {
+ Json::Value* storage = MutableStorage("sharingUser");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const User File::get_trashing_user() const {
+ const Json::Value& storage = Storage("trashingUser");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+User File::mutable_trashingUser() {
+ Json::Value* storage = MutableStorage("trashingUser");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const Permission File::get_user_permission() const {
+ const Json::Value& storage = Storage("userPermission");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+Permission File::mutable_userPermission() {
+ Json::Value* storage = MutableStorage("userPermission");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/file.h b/service_apis/drive/google/drive_api/file.h
index 43d458d..5ce6f4d 100644
--- a/service_apis/drive/google/drive_api/file.h
+++ b/service_apis/drive/google/drive_api/file.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_FILE_H_
#define GOOGLE_DRIVE_API_FILE_H_
@@ -43,16 +41,711 @@ namespace Json {
class Value;
} // namespace Json
-namespace google_drive_api {
-using namespace googleapis;
+namespace google_drive_api {
+using namespace googleapis;
+
+/**
+ * The metadata for a file.
+ *
+ * @ingroup DataObject
+ */
+class File : public client::JsonCppData {
+ public:
+ /**
+ * Capabilities the current user has on this file. Each capability corresponds
+ * to a fine-grained action that a user may take.
+ *
+ * @ingroup DataObject
+ */
+ class FileCapabilities : public client::JsonCppData {
+ public:
+ /**
+ * Creates a new default instance.
+ *
+ * @return Ownership is passed back to the caller.
+ */
+ static FileCapabilities* New();
+
+ /**
+ * Standard constructor for an immutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit FileCapabilities(const Json::Value& storage);
+
+ /**
+ * Standard constructor for a mutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit FileCapabilities(Json::Value* storage);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~FileCapabilities();
+
+ /**
+ * Returns a string denoting the type of this data object.
+ *
+ * @return google_drive_api::FileCapabilities
+ */
+ const StringPiece GetTypeName() const {
+ return StringPiece("google_drive_api::FileCapabilities");
+ }
+
+ /**
+ * Determine if the 'canAddChildren ' attribute was set.
+ *
+ * @return true if the 'canAddChildren ' attribute was set.
+ */
+ bool has_can_add_children() const {
+ return Storage().isMember("canAddChildren");
+ }
+
+ /**
+ * Clears the 'canAddChildren ' attribute.
+ */
+ void clear_can_add_children() {
+ MutableStorage()->removeMember("canAddChildren");
+ }
+
+
+ /**
+ * Get the value of the 'canAddChildren ' attribute.
+ */
+ bool get_can_add_children() const {
+ const Json::Value& storage = Storage("canAddChildren");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canAddChildren ' attribute.
+ *
+ * Whether the current user can add children to this folder. This is always
+ * false when the item is not a folder.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_add_children(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canAddChildren"));
+ }
+
+ /**
+ * Determine if the 'canChangeRestrictedDownload ' attribute was
+ * set.
+ *
+ * @return true if the 'canChangeRestrictedDownload ' attribute
+ * was set.
+ */
+ bool has_can_change_restricted_download() const {
+ return Storage().isMember("canChangeRestrictedDownload");
+ }
+
+ /**
+ * Clears the 'canChangeRestrictedDownload ' attribute.
+ */
+ void clear_can_change_restricted_download() {
+ MutableStorage()->removeMember("canChangeRestrictedDownload");
+ }
+
+
+ /**
+ * Get the value of the 'canChangeRestrictedDownload '
+ * attribute.
+ */
+ bool get_can_change_restricted_download() const {
+ const Json::Value& storage = Storage("canChangeRestrictedDownload");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canChangeRestrictedDownload ' attribute.
+ *
+ * Whether the current user can change the restricted download label of this
+ * file.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_change_restricted_download(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canChangeRestrictedDownload"));
+ }
+
+ /**
+ * Determine if the 'canComment ' attribute was set.
+ *
+ * @return true if the 'canComment ' attribute was set.
+ */
+ bool has_can_comment() const {
+ return Storage().isMember("canComment");
+ }
+
+ /**
+ * Clears the 'canComment ' attribute.
+ */
+ void clear_can_comment() {
+ MutableStorage()->removeMember("canComment");
+ }
+
+
+ /**
+ * Get the value of the 'canComment ' attribute.
+ */
+ bool get_can_comment() const {
+ const Json::Value& storage = Storage("canComment");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canComment ' attribute.
+ *
+ * Whether the current user can comment on this file.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_comment(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canComment"));
+ }
+
+ /**
+ * Determine if the 'canCopy ' attribute was set.
+ *
+ * @return true if the 'canCopy ' attribute was set.
+ */
+ bool has_can_copy() const {
+ return Storage().isMember("canCopy");
+ }
+
+ /**
+ * Clears the 'canCopy ' attribute.
+ */
+ void clear_can_copy() {
+ MutableStorage()->removeMember("canCopy");
+ }
+
+
+ /**
+ * Get the value of the 'canCopy ' attribute.
+ */
+ bool get_can_copy() const {
+ const Json::Value& storage = Storage("canCopy");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canCopy ' attribute.
+ *
+ * Whether the current user can copy this file. For a Team Drive item,
+ * whether the current user can copy non-folder descendants of this item, or
+ * this item itself if it is not a folder.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_copy(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canCopy"));
+ }
+
+ /**
+ * Determine if the 'canDelete ' attribute was set.
+ *
+ * @return true if the 'canDelete ' attribute was set.
+ */
+ bool has_can_delete() const {
+ return Storage().isMember("canDelete");
+ }
+
+ /**
+ * Clears the 'canDelete ' attribute.
+ */
+ void clear_can_delete() {
+ MutableStorage()->removeMember("canDelete");
+ }
+
+
+ /**
+ * Get the value of the 'canDelete ' attribute.
+ */
+ bool get_can_delete() const {
+ const Json::Value& storage = Storage("canDelete");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canDelete ' attribute.
+ *
+ * Whether the current user can delete this file.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_delete(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canDelete"));
+ }
+
+ /**
+ * Determine if the 'canDownload ' attribute was set.
+ *
+ * @return true if the 'canDownload ' attribute was set.
+ */
+ bool has_can_download() const {
+ return Storage().isMember("canDownload");
+ }
+
+ /**
+ * Clears the 'canDownload ' attribute.
+ */
+ void clear_can_download() {
+ MutableStorage()->removeMember("canDownload");
+ }
+
+
+ /**
+ * Get the value of the 'canDownload ' attribute.
+ */
+ bool get_can_download() const {
+ const Json::Value& storage = Storage("canDownload");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canDownload ' attribute.
+ *
+ * Whether the current user can download this file.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_download(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canDownload"));
+ }
+
+ /**
+ * Determine if the 'canEdit ' attribute was set.
+ *
+ * @return true if the 'canEdit ' attribute was set.
+ */
+ bool has_can_edit() const {
+ return Storage().isMember("canEdit");
+ }
+
+ /**
+ * Clears the 'canEdit ' attribute.
+ */
+ void clear_can_edit() {
+ MutableStorage()->removeMember("canEdit");
+ }
+
+
+ /**
+ * Get the value of the 'canEdit ' attribute.
+ */
+ bool get_can_edit() const {
+ const Json::Value& storage = Storage("canEdit");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canEdit ' attribute.
+ *
+ * Whether the current user can edit this file.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_edit(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canEdit"));
+ }
+
+ /**
+ * Determine if the 'canListChildren ' attribute was set.
+ *
+ * @return true if the 'canListChildren ' attribute was set.
+ */
+ bool has_can_list_children() const {
+ return Storage().isMember("canListChildren");
+ }
+
+ /**
+ * Clears the 'canListChildren ' attribute.
+ */
+ void clear_can_list_children() {
+ MutableStorage()->removeMember("canListChildren");
+ }
+
+
+ /**
+ * Get the value of the 'canListChildren ' attribute.
+ */
+ bool get_can_list_children() const {
+ const Json::Value& storage = Storage("canListChildren");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canListChildren ' attribute.
+ *
+ * Whether the current user can list the children of this folder. This is
+ * always false when the item is not a folder.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_list_children(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canListChildren"));
+ }
+
+ /**
+ * Determine if the 'canMoveItemIntoTeamDrive ' attribute was
+ * set.
+ *
+ * @return true if the 'canMoveItemIntoTeamDrive ' attribute was
+ * set.
+ */
+ bool has_can_move_item_into_team_drive() const {
+ return Storage().isMember("canMoveItemIntoTeamDrive");
+ }
+
+ /**
+ * Clears the 'canMoveItemIntoTeamDrive ' attribute.
+ */
+ void clear_can_move_item_into_team_drive() {
+ MutableStorage()->removeMember("canMoveItemIntoTeamDrive");
+ }
+
+
+ /**
+ * Get the value of the 'canMoveItemIntoTeamDrive ' attribute.
+ */
+ bool get_can_move_item_into_team_drive() const {
+ const Json::Value& storage = Storage("canMoveItemIntoTeamDrive");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canMoveItemIntoTeamDrive ' attribute.
+ *
+ * Whether the current user can move this item into a Team Drive. If the
+ * item is in a Team Drive, this field is equivalent to
+ * canMoveTeamDriveItem.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_move_item_into_team_drive(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canMoveItemIntoTeamDrive"));
+ }
+
+ /**
+ * Determine if the 'canMoveTeamDriveItem ' attribute was set.
+ *
+ * @return true if the 'canMoveTeamDriveItem ' attribute was
+ * set.
+ */
+ bool has_can_move_team_drive_item() const {
+ return Storage().isMember("canMoveTeamDriveItem");
+ }
+
+ /**
+ * Clears the 'canMoveTeamDriveItem ' attribute.
+ */
+ void clear_can_move_team_drive_item() {
+ MutableStorage()->removeMember("canMoveTeamDriveItem");
+ }
+
+
+ /**
+ * Get the value of the 'canMoveTeamDriveItem ' attribute.
+ */
+ bool get_can_move_team_drive_item() const {
+ const Json::Value& storage = Storage("canMoveTeamDriveItem");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canMoveTeamDriveItem ' attribute.
+ *
+ * Whether the current user can move this Team Drive item by changing its
+ * parent. Note that a request to change the parent for this item may still
+ * fail depending on the new parent that is being added. Only populated for
+ * Team Drive files.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_move_team_drive_item(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canMoveTeamDriveItem"));
+ }
+
+ /**
+ * Determine if the 'canReadRevisions ' attribute was set.
+ *
+ * @return true if the 'canReadRevisions ' attribute was set.
+ */
+ bool has_can_read_revisions() const {
+ return Storage().isMember("canReadRevisions");
+ }
+
+ /**
+ * Clears the 'canReadRevisions ' attribute.
+ */
+ void clear_can_read_revisions() {
+ MutableStorage()->removeMember("canReadRevisions");
+ }
+
+
+ /**
+ * Get the value of the 'canReadRevisions ' attribute.
+ */
+ bool get_can_read_revisions() const {
+ const Json::Value& storage = Storage("canReadRevisions");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canReadRevisions ' attribute.
+ *
+ * Whether the current user can read the revisions resource of this file.
+ * For a Team Drive item, whether revisions of non-folder descendants of
+ * this item, or this item itself if it is not a folder, can be read.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_read_revisions(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canReadRevisions"));
+ }
+
+ /**
+ * Determine if the 'canReadTeamDrive ' attribute was set.
+ *
+ * @return true if the 'canReadTeamDrive ' attribute was set.
+ */
+ bool has_can_read_team_drive() const {
+ return Storage().isMember("canReadTeamDrive");
+ }
+
+ /**
+ * Clears the 'canReadTeamDrive ' attribute.
+ */
+ void clear_can_read_team_drive() {
+ MutableStorage()->removeMember("canReadTeamDrive");
+ }
+
+
+ /**
+ * Get the value of the 'canReadTeamDrive ' attribute.
+ */
+ bool get_can_read_team_drive() const {
+ const Json::Value& storage = Storage("canReadTeamDrive");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canReadTeamDrive ' attribute.
+ *
+ * Whether the current user can read the Team Drive to which this file
+ * belongs. Only populated for Team Drive files.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_read_team_drive(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canReadTeamDrive"));
+ }
+
+ /**
+ * Determine if the 'canRemoveChildren ' attribute was set.
+ *
+ * @return true if the 'canRemoveChildren ' attribute was set.
+ */
+ bool has_can_remove_children() const {
+ return Storage().isMember("canRemoveChildren");
+ }
+
+ /**
+ * Clears the 'canRemoveChildren ' attribute.
+ */
+ void clear_can_remove_children() {
+ MutableStorage()->removeMember("canRemoveChildren");
+ }
+
+
+ /**
+ * Get the value of the 'canRemoveChildren ' attribute.
+ */
+ bool get_can_remove_children() const {
+ const Json::Value& storage = Storage("canRemoveChildren");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canRemoveChildren ' attribute.
+ *
+ * Whether the current user can remove children from this folder. This is
+ * always false when the item is not a folder.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_remove_children(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canRemoveChildren"));
+ }
+
+ /**
+ * Determine if the 'canRename ' attribute was set.
+ *
+ * @return true if the 'canRename ' attribute was set.
+ */
+ bool has_can_rename() const {
+ return Storage().isMember("canRename");
+ }
+
+ /**
+ * Clears the 'canRename ' attribute.
+ */
+ void clear_can_rename() {
+ MutableStorage()->removeMember("canRename");
+ }
+
+
+ /**
+ * Get the value of the 'canRename ' attribute.
+ */
+ bool get_can_rename() const {
+ const Json::Value& storage = Storage("canRename");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canRename ' attribute.
+ *
+ * Whether the current user can rename this file.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_rename(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canRename"));
+ }
+
+ /**
+ * Determine if the 'canShare ' attribute was set.
+ *
+ * @return true if the 'canShare ' attribute was set.
+ */
+ bool has_can_share() const {
+ return Storage().isMember("canShare");
+ }
+
+ /**
+ * Clears the 'canShare ' attribute.
+ */
+ void clear_can_share() {
+ MutableStorage()->removeMember("canShare");
+ }
+
+
+ /**
+ * Get the value of the 'canShare ' attribute.
+ */
+ bool get_can_share() const {
+ const Json::Value& storage = Storage("canShare");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canShare ' attribute.
+ *
+ * Whether the current user can modify the sharing settings for this file.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_share(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canShare"));
+ }
+
+ /**
+ * Determine if the 'canTrash ' attribute was set.
+ *
+ * @return true if the 'canTrash ' attribute was set.
+ */
+ bool has_can_trash() const {
+ return Storage().isMember("canTrash");
+ }
+
+ /**
+ * Clears the 'canTrash ' attribute.
+ */
+ void clear_can_trash() {
+ MutableStorage()->removeMember("canTrash");
+ }
+
+
+ /**
+ * Get the value of the 'canTrash ' attribute.
+ */
+ bool get_can_trash() const {
+ const Json::Value& storage = Storage("canTrash");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canTrash ' attribute.
+ *
+ * Whether the current user can move this file to trash.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_trash(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canTrash"));
+ }
+
+ /**
+ * Determine if the 'canUntrash ' attribute was set.
+ *
+ * @return true if the 'canUntrash ' attribute was set.
+ */
+ bool has_can_untrash() const {
+ return Storage().isMember("canUntrash");
+ }
+
+ /**
+ * Clears the 'canUntrash ' attribute.
+ */
+ void clear_can_untrash() {
+ MutableStorage()->removeMember("canUntrash");
+ }
+
+
+ /**
+ * Get the value of the 'canUntrash ' attribute.
+ */
+ bool get_can_untrash() const {
+ const Json::Value& storage = Storage("canUntrash");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canUntrash ' attribute.
+ *
+ * Whether the current user can restore this file from trash.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_untrash(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canUntrash"));
+ }
-/**
- * The metadata for a file.
- *
- * @ingroup DataObject
- */
-class File : public client::JsonCppData {
- public:
+ private:
+ void operator=(const FileCapabilities&);
+ }; // FileCapabilities
/**
* Metadata about image media. This will only be present for image types, and
* its contents will depend on what can be parsed from the image content.
@@ -1197,6 +1890,43 @@ class File : public client::JsonCppData {
value, MutableStorage("hidden"));
}
+ /**
+ * Determine if the 'modified ' attribute was set.
+ *
+ * @return true if the 'modified ' attribute was set.
+ */
+ bool has_modified() const {
+ return Storage().isMember("modified");
+ }
+
+ /**
+ * Clears the 'modified ' attribute.
+ */
+ void clear_modified() {
+ MutableStorage()->removeMember("modified");
+ }
+
+
+ /**
+ * Get the value of the 'modified ' attribute.
+ */
+ bool get_modified() const {
+ const Json::Value& storage = Storage("modified");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'modified ' attribute.
+ *
+ * Whether the file has been modified by this user.
+ *
+ * @param[in] value The new value.
+ */
+ void set_modified(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("modified"));
+ }
+
/**
* Determine if the 'restricted ' attribute was set.
*
@@ -1352,8 +2082,8 @@ class File : public client::JsonCppData {
void operator=(const FileLabels&);
}; // FileLabels
/**
- * Thumbnail for the file. Only accepted on upload and for files that are not
- * already thumbnailed by Google.
+ * A thumbnail for the file. This will only be used if Drive cannot generate a
+ * standard thumbnail.
*
* @ingroup DataObject
*/
@@ -1764,8 +2494,10 @@ class File : public client::JsonCppData {
/**
* Change the 'canComment ' attribute.
+ * @deprecated
+ *
*
- * Whether the current user can comment on the file.
+ * Deprecated: use capabilities/canComment.
*
* @param[in] value The new value.
*/
@@ -1774,6 +2506,84 @@ class File : public client::JsonCppData {
value, MutableStorage("canComment"));
}
+ /**
+ * Determine if the 'canReadRevisions ' attribute was set.
+ *
+ * @return true if the 'canReadRevisions ' attribute was set.
+ */
+ bool has_can_read_revisions() const {
+ return Storage().isMember("canReadRevisions");
+ }
+
+ /**
+ * Clears the 'canReadRevisions ' attribute.
+ */
+ void clear_can_read_revisions() {
+ MutableStorage()->removeMember("canReadRevisions");
+ }
+
+
+ /**
+ * Get the value of the 'canReadRevisions ' attribute.
+ */
+ bool get_can_read_revisions() const {
+ const Json::Value& storage = Storage("canReadRevisions");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canReadRevisions ' attribute.
+ * @deprecated
+ *
+ *
+ * Deprecated: use capabilities/canReadRevisions.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_read_revisions(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canReadRevisions"));
+ }
+
+ /**
+ * Determine if the 'capabilities ' attribute was set.
+ *
+ * @return true if the 'capabilities ' attribute was set.
+ */
+ bool has_capabilities() const {
+ return Storage().isMember("capabilities");
+ }
+
+ /**
+ * Clears the 'capabilities ' attribute.
+ */
+ void clear_capabilities() {
+ MutableStorage()->removeMember("capabilities");
+ }
+
+
+ /**
+ * Get a reference to the value of the 'capabilities ' attribute.
+ */
+ const FileCapabilities get_capabilities() const {
+ const Json::Value& storage = Storage("capabilities");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Gets a reference to a mutable value of the 'capabilities '
+ * property.
+ *
+ * Capabilities the current user has on this file. Each capability corresponds
+ * to a fine-grained action that a user may take.
+ *
+ * @return The result can be modified to change the attribute value.
+ */
+ FileCapabilities mutable_capabilities() {
+ Json::Value* storage = MutableStorage("capabilities");
+ return client::JsonValueToMutableCppValueHelper(storage);
+ }
+
/**
* Determine if the 'copyable ' attribute was set.
*
@@ -1801,8 +2611,10 @@ class File : public client::JsonCppData {
/**
* Change the 'copyable ' attribute.
+ * @deprecated
*
- * Whether the file can be copied by the current user.
+ *
+ * Deprecated: use capabilities/canCopy.
*
* @param[in] value The new value.
*/
@@ -1984,8 +2796,10 @@ class File : public client::JsonCppData {
/**
* Change the 'editable ' attribute.
+ * @deprecated
*
- * Whether the file can be edited by the current user.
+ *
+ * Deprecated: use capabilities/canEdit.
*
* @param[in] value The new value.
*/
@@ -2255,7 +3069,7 @@ class File : public client::JsonCppData {
* Folder color as an RGB hex string if the file is a folder. The list of
* supported colors is available in the folderColorPalette field of the About
* resource. If an unsupported color is specified, it will be changed to the
- * closest color in the palette.
+ * closest color in the palette. Not populated for Team Drive files.
*
* @param[in] value The new value.
*/
@@ -2305,6 +3119,84 @@ class File : public client::JsonCppData {
*MutableStorage("fullFileExtension") = value.data();
}
+ /**
+ * Determine if the 'hasAugmentedPermissions ' attribute was set.
+ *
+ * @return true if the 'hasAugmentedPermissions ' attribute was
+ * set.
+ */
+ bool has_has_augmented_permissions() const {
+ return Storage().isMember("hasAugmentedPermissions");
+ }
+
+ /**
+ * Clears the 'hasAugmentedPermissions ' attribute.
+ */
+ void clear_has_augmented_permissions() {
+ MutableStorage()->removeMember("hasAugmentedPermissions");
+ }
+
+
+ /**
+ * Get the value of the 'hasAugmentedPermissions ' attribute.
+ */
+ bool get_has_augmented_permissions() const {
+ const Json::Value& storage = Storage("hasAugmentedPermissions");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'hasAugmentedPermissions ' attribute.
+ *
+ * Whether any users are granted file access directly on this file. This field
+ * is only populated for Team Drive files.
+ *
+ * @param[in] value The new value.
+ */
+ void set_has_augmented_permissions(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("hasAugmentedPermissions"));
+ }
+
+ /**
+ * Determine if the 'hasThumbnail ' attribute was set.
+ *
+ * @return true if the 'hasThumbnail ' attribute was set.
+ */
+ bool has_has_thumbnail() const {
+ return Storage().isMember("hasThumbnail");
+ }
+
+ /**
+ * Clears the 'hasThumbnail ' attribute.
+ */
+ void clear_has_thumbnail() {
+ MutableStorage()->removeMember("hasThumbnail");
+ }
+
+
+ /**
+ * Get the value of the 'hasThumbnail ' attribute.
+ */
+ bool get_has_thumbnail() const {
+ const Json::Value& storage = Storage("hasThumbnail");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'hasThumbnail ' attribute.
+ *
+ * Whether this file has a thumbnail. This does not indicate whether the
+ * requesting app has access to the thumbnail. To check access, look for the
+ * presence of the thumbnailLink field.
+ *
+ * @param[in] value The new value.
+ */
+ void set_has_thumbnail(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("hasThumbnail"));
+ }
+
/**
* Determine if the 'headRevisionId ' attribute was set.
*
@@ -2496,6 +3388,43 @@ class File : public client::JsonCppData {
return client::JsonValueToMutableCppValueHelper(storage);
}
+ /**
+ * Determine if the 'isAppAuthorized ' attribute was set.
+ *
+ * @return true if the 'isAppAuthorized ' attribute was set.
+ */
+ bool has_is_app_authorized() const {
+ return Storage().isMember("isAppAuthorized");
+ }
+
+ /**
+ * Clears the 'isAppAuthorized ' attribute.
+ */
+ void clear_is_app_authorized() {
+ MutableStorage()->removeMember("isAppAuthorized");
+ }
+
+
+ /**
+ * Get the value of the 'isAppAuthorized ' attribute.
+ */
+ bool get_is_app_authorized() const {
+ const Json::Value& storage = Storage("isAppAuthorized");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'isAppAuthorized ' attribute.
+ *
+ * Whether the file was created or opened by the requesting app.
+ *
+ * @param[in] value The new value.
+ */
+ void set_is_app_authorized(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("isAppAuthorized"));
+ }
+
/**
* Determine if the 'kind ' attribute was set.
*
@@ -2939,11 +3868,9 @@ class File : public client::JsonCppData {
/**
* Change the 'originalFilename ' attribute.
*
- * The original filename if the file was uploaded manually, or the original
- * title if the file was inserted through the API. Note that renames of the
- * title will not change the original filename. This field is only populated
- * for files with content stored in Drive; it is not populated for Google Docs
- * or shortcut files.
+ * The original filename of the uploaded content if available, or else the
+ * original value of the title field. This is only available for files with
+ * binary content in Drive.
*
* @param[in] value The new value.
*/
@@ -2979,7 +3906,8 @@ class File : public client::JsonCppData {
/**
* Change the 'ownedByMe ' attribute.
*
- * Whether the file is owned by the current user.
+ * Whether the file is owned by the current user. Not populated for Team Drive
+ * files.
*
* @param[in] value The new value.
*/
@@ -3017,7 +3945,7 @@ class File : public client::JsonCppData {
* Gets a reference to a mutable value of the 'ownerNames '
* property.
*
- * Name(s) of the owner(s) of this file.
+ * Name(s) of the owner(s) of this file. Not populated for Team Drive files.
*
* @return The result can be modified to change the attribute value.
*/
@@ -3051,7 +3979,7 @@ class File : public client::JsonCppData {
/**
* Gets a reference to a mutable value of the 'owners ' property.
*
- * The owner(s) of this file.
+ * The owner(s) of this file. Not populated for Team Drive files.
*
* @return The result can be modified to change the attribute value.
*/
@@ -3117,7 +4045,8 @@ class File : public client::JsonCppData {
* Gets a reference to a mutable value of the 'permissions '
* property.
*
- * The list of permissions for users with access to this file.
+ * The list of permissions for users with access to this file. Not populated
+ * for Team Drive files.
*
* @return The result can be modified to change the attribute value.
*/
@@ -3256,8 +4185,10 @@ class File : public client::JsonCppData {
/**
* Change the 'shareable ' attribute.
+ * @deprecated
*
- * Whether the file's sharing settings can be modified by the current user.
+ *
+ * Deprecated: use capabilities/canShare.
*
* @param[in] value The new value.
*/
@@ -3294,7 +4225,7 @@ class File : public client::JsonCppData {
/**
* Change the 'shared ' attribute.
*
- * Whether the file has been shared.
+ * Whether the file has been shared. Not populated for Team Drive files.
*
* @param[in] value The new value.
*/
@@ -3411,6 +4342,43 @@ class File : public client::JsonCppData {
return client::JsonValueToMutableCppValueHelper >(storage);
}
+ /**
+ * Determine if the 'teamDriveId ' attribute was set.
+ *
+ * @return true if the 'teamDriveId ' attribute was set.
+ */
+ bool has_team_drive_id() const {
+ return Storage().isMember("teamDriveId");
+ }
+
+ /**
+ * Clears the 'teamDriveId ' attribute.
+ */
+ void clear_team_drive_id() {
+ MutableStorage()->removeMember("teamDriveId");
+ }
+
+
+ /**
+ * Get the value of the 'teamDriveId ' attribute.
+ */
+ const StringPiece get_team_drive_id() const {
+ const Json::Value& v = Storage("teamDriveId");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'teamDriveId ' attribute.
+ *
+ * ID of the Team Drive the file resides in.
+ *
+ * @param[in] value The new value.
+ */
+ void set_team_drive_id(const StringPiece& value) {
+ *MutableStorage("teamDriveId") = value.data();
+ }
+
/**
* Determine if the 'thumbnail ' attribute was set.
*
@@ -3440,8 +4408,8 @@ class File : public client::JsonCppData {
* Gets a reference to a mutable value of the 'thumbnail '
* property.
*
- * Thumbnail for the file. Only accepted on upload and for files that are not
- * already thumbnailed by Google.
+ * A thumbnail for the file. This will only be used if Drive cannot generate a
+ * standard thumbnail.
*
* @return The result can be modified to change the attribute value.
*/
@@ -3480,7 +4448,8 @@ class File : public client::JsonCppData {
* Change the 'thumbnailLink ' attribute.
*
* A short-lived link to the file's thumbnail. Typically lasts on the order of
- * hours.
+ * hours. Only populated when the requesting app can access the file's
+ * content.
*
* @param[in] value The new value.
*/
@@ -3488,6 +4457,43 @@ class File : public client::JsonCppData {
*MutableStorage("thumbnailLink") = value.data();
}
+ /**
+ * Determine if the 'thumbnailVersion ' attribute was set.
+ *
+ * @return true if the 'thumbnailVersion ' attribute was set.
+ */
+ bool has_thumbnail_version() const {
+ return Storage().isMember("thumbnailVersion");
+ }
+
+ /**
+ * Clears the 'thumbnailVersion ' attribute.
+ */
+ void clear_thumbnail_version() {
+ MutableStorage()->removeMember("thumbnailVersion");
+ }
+
+
+ /**
+ * Get the value of the 'thumbnailVersion ' attribute.
+ */
+ int64 get_thumbnail_version() const {
+ const Json::Value& storage = Storage("thumbnailVersion");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'thumbnailVersion ' attribute.
+ *
+ * The thumbnail version for use in thumbnail cache invalidation.
+ *
+ * @param[in] value The new value.
+ */
+ void set_thumbnail_version(int64 value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("thumbnailVersion"));
+ }
+
/**
* Determine if the 'title ' attribute was set.
*
@@ -3517,7 +4523,9 @@ class File : public client::JsonCppData {
/**
* Change the 'title ' attribute.
*
- * The title of this file.
+ * The title of this file. Note that for immutable items such as the top level
+ * folders of Team Drives, My Drive root folder, and Application Data folder
+ * the title is constant.
*
* @param[in] value The new value.
*/
@@ -3525,6 +4533,77 @@ class File : public client::JsonCppData {
*MutableStorage("title") = value.data();
}
+ /**
+ * Determine if the 'trashedDate ' attribute was set.
+ *
+ * @return true if the 'trashedDate ' attribute was set.
+ */
+ bool has_trashed_date() const {
+ return Storage().isMember("trashedDate");
+ }
+
+ /**
+ * Clears the 'trashedDate ' attribute.
+ */
+ void clear_trashed_date() {
+ MutableStorage()->removeMember("trashedDate");
+ }
+
+
+ /**
+ * Get the value of the 'trashedDate ' attribute.
+ */
+ client::DateTime get_trashed_date() const {
+ const Json::Value& storage = Storage("trashedDate");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'trashedDate ' attribute.
+ *
+ * The time that the item was trashed (formatted RFC 3339 timestamp). Only
+ * populated for Team Drive files.
+ *
+ * @param[in] value The new value.
+ */
+ void set_trashed_date(client::DateTime value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("trashedDate"));
+ }
+
+ /**
+ * Determine if the 'trashingUser ' attribute was set.
+ *
+ * @return true if the 'trashingUser ' attribute was set.
+ */
+ bool has_trashing_user() const {
+ return Storage().isMember("trashingUser");
+ }
+
+ /**
+ * Clears the 'trashingUser ' attribute.
+ */
+ void clear_trashing_user() {
+ MutableStorage()->removeMember("trashingUser");
+ }
+
+
+ /**
+ * Get a reference to the value of the 'trashingUser ' attribute.
+ */
+ const User get_trashing_user() const;
+
+ /**
+ * Gets a reference to a mutable value of the 'trashingUser '
+ * property.
+ *
+ * If the file has been explicitly trashed, the user who trashed it. Only
+ * populated for Team Drive files.
+ *
+ * @return The result can be modified to change the attribute value.
+ */
+ User mutable_trashingUser();
+
/**
* Determine if the 'userPermission ' attribute was set.
*
@@ -3741,7 +4820,8 @@ class File : public client::JsonCppData {
/**
* Change the 'writersCanShare ' attribute.
*
- * Whether writers can share the document with other users.
+ * Whether writers can share the document with other users. Not populated for
+ * Team Drive files.
*
* @param[in] value The new value.
*/
diff --git a/service_apis/drive/google/drive_api/file_list.cc b/service_apis/drive/google/drive_api/file_list.cc
index 5a2be53..7eb3398 100644
--- a/service_apis/drive/google/drive_api/file_list.cc
+++ b/service_apis/drive/google/drive_api/file_list.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// FileList
// Documentation:
@@ -59,4 +56,16 @@ FileList::FileList(Json::Value* storage)
// Standard destructor.
FileList::~FileList() {
}
+
+// Properties.
+
+const client::JsonCppArray FileList::get_items() const {
+ const Json::Value& storage = Storage("items");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray FileList::mutable_items() {
+ Json::Value* storage = MutableStorage("items");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/file_list.h b/service_apis/drive/google/drive_api/file_list.h
index bd3c20e..e75fdf8 100644
--- a/service_apis/drive/google/drive_api/file_list.h
+++ b/service_apis/drive/google/drive_api/file_list.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_FILE_LIST_H_
#define GOOGLE_DRIVE_API_FILE_LIST_H_
@@ -120,6 +118,48 @@ class FileList : public client::JsonCppData {
*MutableStorage("etag") = value.data();
}
+ /**
+ * Determine if the 'incompleteSearch ' attribute was set.
+ *
+ * @return true if the 'incompleteSearch ' attribute was set.
+ */
+ bool has_incomplete_search() const {
+ return Storage().isMember("incompleteSearch");
+ }
+
+ /**
+ * Clears the 'incompleteSearch ' attribute.
+ */
+ void clear_incomplete_search() {
+ MutableStorage()->removeMember("incompleteSearch");
+ }
+
+
+ /**
+ * Get the value of the 'incompleteSearch ' attribute.
+ */
+ bool get_incomplete_search() const {
+ const Json::Value& storage = Storage("incompleteSearch");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'incompleteSearch ' attribute.
+ *
+ * Whether the search process was incomplete. If true, then some search
+ * results may be missing, since all documents were not searched. This may
+ * occur when searching multiple Team Drives with the "default,allTeamDrives"
+ * corpora, but all corpora could not be searched. When this happens, it is
+ * suggested that clients narrow their query by choosing a different corpus
+ * such as "default" or "teamDrive".
+ *
+ * @param[in] value The new value.
+ */
+ void set_incomplete_search(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("incompleteSearch"));
+ }
+
/**
* Determine if the 'items ' attribute was set.
*
@@ -145,7 +185,8 @@ class FileList : public client::JsonCppData {
/**
* Gets a reference to a mutable value of the 'items ' property.
*
- * The actual list of files.
+ * The list of files. If nextPageToken is populated, then this list may be
+ * incomplete and an additional page of results should be fetched.
*
* @return The result can be modified to change the attribute value.
*/
@@ -254,7 +295,10 @@ class FileList : public client::JsonCppData {
/**
* Change the 'nextPageToken ' attribute.
*
- * The page token for the next page of files.
+ * The page token for the next page of files. This will be absent if the end
+ * of the files list has been reached. If the token is rejected for any
+ * reason, it should be discarded, and pagination should be restarted from the
+ * first page of results.
*
* @param[in] value The new value.
*/
diff --git a/service_apis/drive/google/drive_api/generated_ids.cc b/service_apis/drive/google/drive_api/generated_ids.cc
index 1d2eeb3..b796186 100644
--- a/service_apis/drive/google/drive_api/generated_ids.cc
+++ b/service_apis/drive/google/drive_api/generated_ids.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// GeneratedIds
// Documentation:
@@ -57,4 +54,6 @@ GeneratedIds::GeneratedIds(Json::Value* storage)
// Standard destructor.
GeneratedIds::~GeneratedIds() {
}
+
+// Properties.
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/generated_ids.h b/service_apis/drive/google/drive_api/generated_ids.h
index e7c224d..cbdf01c 100644
--- a/service_apis/drive/google/drive_api/generated_ids.h
+++ b/service_apis/drive/google/drive_api/generated_ids.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_GENERATED_IDS_H_
#define GOOGLE_DRIVE_API_GENERATED_IDS_H_
diff --git a/service_apis/drive/google/drive_api/parent_list.cc b/service_apis/drive/google/drive_api/parent_list.cc
index 3cb829c..7a39ea6 100644
--- a/service_apis/drive/google/drive_api/parent_list.cc
+++ b/service_apis/drive/google/drive_api/parent_list.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// ParentList
// Documentation:
@@ -59,4 +56,16 @@ ParentList::ParentList(Json::Value* storage)
// Standard destructor.
ParentList::~ParentList() {
}
+
+// Properties.
+
+const client::JsonCppArray ParentList::get_items() const {
+ const Json::Value& storage = Storage("items");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray ParentList::mutable_items() {
+ Json::Value* storage = MutableStorage("items");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/parent_list.h b/service_apis/drive/google/drive_api/parent_list.h
index 5f8bae8..e24fb87 100644
--- a/service_apis/drive/google/drive_api/parent_list.h
+++ b/service_apis/drive/google/drive_api/parent_list.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_PARENT_LIST_H_
#define GOOGLE_DRIVE_API_PARENT_LIST_H_
@@ -145,7 +143,7 @@ class ParentList : public client::JsonCppData {
/**
* Gets a reference to a mutable value of the 'items ' property.
*
- * The actual list of parents.
+ * The list of parents.
*
* @return The result can be modified to change the attribute value.
*/
diff --git a/service_apis/drive/google/drive_api/parent_reference.cc b/service_apis/drive/google/drive_api/parent_reference.cc
index db311b7..1390c92 100644
--- a/service_apis/drive/google/drive_api/parent_reference.cc
+++ b/service_apis/drive/google/drive_api/parent_reference.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// ParentReference
// Documentation:
@@ -57,4 +54,6 @@ ParentReference::ParentReference(Json::Value* storage)
// Standard destructor.
ParentReference::~ParentReference() {
}
+
+// Properties.
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/parent_reference.h b/service_apis/drive/google/drive_api/parent_reference.h
index d0d8478..6bc961f 100644
--- a/service_apis/drive/google/drive_api/parent_reference.h
+++ b/service_apis/drive/google/drive_api/parent_reference.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_PARENT_REFERENCE_H_
#define GOOGLE_DRIVE_API_PARENT_REFERENCE_H_
diff --git a/service_apis/drive/google/drive_api/permission.cc b/service_apis/drive/google/drive_api/permission.cc
index b35f771..9852f82 100644
--- a/service_apis/drive/google/drive_api/permission.cc
+++ b/service_apis/drive/google/drive_api/permission.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// Permission
// Documentation:
@@ -29,6 +26,7 @@
#include "google/drive_api/permission.h"
#include
#include "googleapis/client/data/jsoncpp_data.h"
+#include "googleapis/client/util/date_time.h"
#include "googleapis/strings/stringpiece.h"
@@ -39,6 +37,27 @@ namespace google_drive_api {
using namespace googleapis;
+
+// Object factory method (static).
+Permission::PermissionTeamDrivePermissionDetails* Permission::PermissionTeamDrivePermissionDetails::New() {
+ return new client::JsonCppCapsule;
+}
+
+// Standard immutable constructor.
+Permission::PermissionTeamDrivePermissionDetails::PermissionTeamDrivePermissionDetails(const Json::Value& storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard mutable constructor.
+Permission::PermissionTeamDrivePermissionDetails::PermissionTeamDrivePermissionDetails(Json::Value* storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard destructor.
+Permission::PermissionTeamDrivePermissionDetails::~PermissionTeamDrivePermissionDetails() {
+}
+
+// Properties.
// Object factory method (static).
Permission* Permission::New() {
return new client::JsonCppCapsule;
@@ -57,4 +76,6 @@ Permission::Permission(Json::Value* storage)
// Standard destructor.
Permission::~Permission() {
}
+
+// Properties.
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/permission.h b/service_apis/drive/google/drive_api/permission.h
index 3ae22f0..88b17c2 100644
--- a/service_apis/drive/google/drive_api/permission.h
+++ b/service_apis/drive/google/drive_api/permission.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,15 +18,17 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_PERMISSION_H_
#define GOOGLE_DRIVE_API_PERMISSION_H_
#include
#include "googleapis/base/macros.h"
#include "googleapis/client/data/jsoncpp_data.h"
+#include "googleapis/client/util/date_time.h"
#include "googleapis/strings/stringpiece.h"
namespace Json {
@@ -46,6 +45,251 @@ using namespace googleapis;
*/
class Permission : public client::JsonCppData {
public:
+ /**
+ * No description provided.
+ *
+ * @ingroup DataObject
+ */
+ class PermissionTeamDrivePermissionDetails : public client::JsonCppData {
+ public:
+ /**
+ * Creates a new default instance.
+ *
+ * @return Ownership is passed back to the caller.
+ */
+ static PermissionTeamDrivePermissionDetails* New();
+
+ /**
+ * Standard constructor for an immutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit PermissionTeamDrivePermissionDetails(const Json::Value& storage);
+
+ /**
+ * Standard constructor for a mutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit PermissionTeamDrivePermissionDetails(Json::Value* storage);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~PermissionTeamDrivePermissionDetails();
+
+ /**
+ * Returns a string denoting the type of this data object.
+ *
+ * @return
+ * google_drive_api::PermissionTeamDrivePermissionDetails
+ */
+ const StringPiece GetTypeName() const {
+ return StringPiece("google_drive_api::PermissionTeamDrivePermissionDetails");
+ }
+
+ /**
+ * Determine if the 'additionalRoles ' attribute was set.
+ *
+ * @return true if the 'additionalRoles ' attribute was set.
+ */
+ bool has_additional_roles() const {
+ return Storage().isMember("additionalRoles");
+ }
+
+ /**
+ * Clears the 'additionalRoles ' attribute.
+ */
+ void clear_additional_roles() {
+ MutableStorage()->removeMember("additionalRoles");
+ }
+
+
+ /**
+ * Get a reference to the value of the 'additionalRoles '
+ * attribute.
+ */
+ const client::JsonCppArray get_additional_roles() const {
+ const Json::Value& storage = Storage("additionalRoles");
+ return client::JsonValueToCppValueHelper >(storage);
+ }
+
+ /**
+ * Gets a reference to a mutable value of the 'additionalRoles '
+ * property.
+ *
+ * Additional roles for this user. Only commenter is currently possible,
+ * though more may be supported in the future.
+ *
+ * @return The result can be modified to change the attribute value.
+ */
+ client::JsonCppArray mutable_additionalRoles() {
+ Json::Value* storage = MutableStorage("additionalRoles");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+ }
+
+ /**
+ * Determine if the 'inherited ' attribute was set.
+ *
+ * @return true if the 'inherited ' attribute was set.
+ */
+ bool has_inherited() const {
+ return Storage().isMember("inherited");
+ }
+
+ /**
+ * Clears the 'inherited ' attribute.
+ */
+ void clear_inherited() {
+ MutableStorage()->removeMember("inherited");
+ }
+
+
+ /**
+ * Get the value of the 'inherited ' attribute.
+ */
+ bool get_inherited() const {
+ const Json::Value& storage = Storage("inherited");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'inherited ' attribute.
+ *
+ * Whether this permission is inherited. This field is always populated.
+ * This is an output-only field.
+ *
+ * @param[in] value The new value.
+ */
+ void set_inherited(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("inherited"));
+ }
+
+ /**
+ * Determine if the 'inheritedFrom ' attribute was set.
+ *
+ * @return true if the 'inheritedFrom ' attribute was set.
+ */
+ bool has_inherited_from() const {
+ return Storage().isMember("inheritedFrom");
+ }
+
+ /**
+ * Clears the 'inheritedFrom ' attribute.
+ */
+ void clear_inherited_from() {
+ MutableStorage()->removeMember("inheritedFrom");
+ }
+
+
+ /**
+ * Get the value of the 'inheritedFrom ' attribute.
+ */
+ const StringPiece get_inherited_from() const {
+ const Json::Value& v = Storage("inheritedFrom");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'inheritedFrom ' attribute.
+ *
+ * The ID of the item from which this permission is inherited. This is an
+ * output-only field and is only populated for members of the Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_inherited_from(const StringPiece& value) {
+ *MutableStorage("inheritedFrom") = value.data();
+ }
+
+ /**
+ * Determine if the 'role ' attribute was set.
+ *
+ * @return true if the 'role ' attribute was set.
+ */
+ bool has_role() const {
+ return Storage().isMember("role");
+ }
+
+ /**
+ * Clears the 'role ' attribute.
+ */
+ void clear_role() {
+ MutableStorage()->removeMember("role");
+ }
+
+
+ /**
+ * Get the value of the 'role ' attribute.
+ */
+ const StringPiece get_role() const {
+ const Json::Value& v = Storage("role");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'role ' attribute.
+ *
+ * The primary role for this user. While new values may be added in the
+ * future, the following are currently possible:
+ * - organizer
+ * - reader
+ * - writer.
+ *
+ * @param[in] value The new value.
+ */
+ void set_role(const StringPiece& value) {
+ *MutableStorage("role") = value.data();
+ }
+
+ /**
+ * Determine if the 'teamDrivePermissionType ' attribute was
+ * set.
+ *
+ * @return true if the 'teamDrivePermissionType ' attribute was
+ * set.
+ */
+ bool has_team_drive_permission_type() const {
+ return Storage().isMember("teamDrivePermissionType");
+ }
+
+ /**
+ * Clears the 'teamDrivePermissionType ' attribute.
+ */
+ void clear_team_drive_permission_type() {
+ MutableStorage()->removeMember("teamDrivePermissionType");
+ }
+
+
+ /**
+ * Get the value of the 'teamDrivePermissionType ' attribute.
+ */
+ const StringPiece get_team_drive_permission_type() const {
+ const Json::Value& v = Storage("teamDrivePermissionType");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'teamDrivePermissionType ' attribute.
+ *
+ * The Team Drive permission type for this user. While new values may be
+ * added in future, the following are currently possible:
+ * - file
+ * - member.
+ *
+ * @param[in] value The new value.
+ */
+ void set_team_drive_permission_type(const StringPiece& value) {
+ *MutableStorage("teamDrivePermissionType") = value.data();
+ }
+
+ private:
+ void operator=(const PermissionTeamDrivePermissionDetails&);
+ }; // PermissionTeamDrivePermissionDetails
/**
* Creates a new default instance.
*
@@ -111,7 +355,8 @@ class Permission : public client::JsonCppData {
* Gets a reference to a mutable value of the 'additionalRoles '
* property.
*
- * Additional roles for this user. Only commenter is currently allowed.
+ * Additional roles for this user. Only commenter is currently allowed, though
+ * more may be supported in the future.
*
* @return The result can be modified to change the attribute value.
*/
@@ -157,6 +402,44 @@ class Permission : public client::JsonCppData {
*MutableStorage("authKey") = value.data();
}
+ /**
+ * Determine if the 'deleted ' attribute was set.
+ *
+ * @return true if the 'deleted ' attribute was set.
+ */
+ bool has_deleted() const {
+ return Storage().isMember("deleted");
+ }
+
+ /**
+ * Clears the 'deleted ' attribute.
+ */
+ void clear_deleted() {
+ MutableStorage()->removeMember("deleted");
+ }
+
+
+ /**
+ * Get the value of the 'deleted ' attribute.
+ */
+ bool get_deleted() const {
+ const Json::Value& storage = Storage("deleted");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'deleted ' attribute.
+ *
+ * Whether the account associated with this permission has been deleted. This
+ * field only pertains to user and group permissions.
+ *
+ * @param[in] value The new value.
+ */
+ void set_deleted(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("deleted"));
+ }
+
/**
* Determine if the 'domain ' attribute was set.
*
@@ -272,6 +555,48 @@ class Permission : public client::JsonCppData {
*MutableStorage("etag") = value.data();
}
+ /**
+ * Determine if the 'expirationDate ' attribute was set.
+ *
+ * @return true if the 'expirationDate ' attribute was set.
+ */
+ bool has_expiration_date() const {
+ return Storage().isMember("expirationDate");
+ }
+
+ /**
+ * Clears the 'expirationDate ' attribute.
+ */
+ void clear_expiration_date() {
+ MutableStorage()->removeMember("expirationDate");
+ }
+
+
+ /**
+ * Get the value of the 'expirationDate ' attribute.
+ */
+ client::DateTime get_expiration_date() const {
+ const Json::Value& storage = Storage("expirationDate");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'expirationDate ' attribute.
+ *
+ * The time at which this permission will expire (RFC 3339 date-time).
+ * Expiration dates have the following restrictions:
+ * - They can only be set on user and group permissions
+ * - The date must be in the future
+ * - The date cannot be more than a year in the future
+ * - The date can only be set on drive.permissions.update requests.
+ *
+ * @param[in] value The new value.
+ */
+ void set_expiration_date(client::DateTime value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("expirationDate"));
+ }
+
/**
* Determine if the 'id ' attribute was set.
*
@@ -304,7 +629,8 @@ class Permission : public client::JsonCppData {
* The ID of the user this permission refers to, and identical to the
* permissionId in the About and Files resources. When making a
* drive.permissions.insert request, exactly one of the id or value fields
- * must be specified.
+ * must be specified unless the permission type is anyone, in which case both
+ * id and value are ignored.
*
* @param[in] value The new value.
*/
@@ -452,7 +778,9 @@ class Permission : public client::JsonCppData {
/**
* Change the 'role ' attribute.
*
- * The primary role for this user. Allowed values are:
+ * The primary role for this user. While new values may be supported in the
+ * future, the following are currently allowed:
+ * - organizer
* - owner
* - reader
* - writer.
@@ -500,6 +828,49 @@ class Permission : public client::JsonCppData {
*MutableStorage("selfLink") = value.data();
}
+ /**
+ * Determine if the 'teamDrivePermissionDetails ' attribute was
+ * set.
+ *
+ * @return true if the 'teamDrivePermissionDetails ' attribute was
+ * set.
+ */
+ bool has_team_drive_permission_details() const {
+ return Storage().isMember("teamDrivePermissionDetails");
+ }
+
+ /**
+ * Clears the 'teamDrivePermissionDetails ' attribute.
+ */
+ void clear_team_drive_permission_details() {
+ MutableStorage()->removeMember("teamDrivePermissionDetails");
+ }
+
+
+ /**
+ * Get a reference to the value of the
+ * 'teamDrivePermissionDetails ' attribute.
+ */
+ const client::JsonCppArray get_team_drive_permission_details() const {
+ const Json::Value& storage = Storage("teamDrivePermissionDetails");
+ return client::JsonValueToCppValueHelper >(storage);
+ }
+
+ /**
+ * Gets a reference to a mutable value of the
+ * 'teamDrivePermissionDetails ' property.
+ *
+ * Details of whether the permissions on this Team Drive item are inherited or
+ * directly on this item. This is an output-only field which is present only
+ * for Team Drive items.
+ *
+ * @return The result can be modified to change the attribute value.
+ */
+ client::JsonCppArray mutable_teamDrivePermissionDetails() {
+ Json::Value* storage = MutableStorage("teamDrivePermissionDetails");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+ }
+
/**
* Determine if the 'type ' attribute was set.
*
@@ -573,7 +944,8 @@ class Permission : public client::JsonCppData {
* The email address or domain name for the entity. This is used during
* inserts and is not populated in responses. When making a
* drive.permissions.insert request, exactly one of the id or value fields
- * must be specified.
+ * must be specified unless the permission type is anyone, in which case both
+ * id and value are ignored.
*
* @param[in] value The new value.
*/
diff --git a/service_apis/drive/google/drive_api/permission_id.cc b/service_apis/drive/google/drive_api/permission_id.cc
index 3cfb13b..adcf9cc 100644
--- a/service_apis/drive/google/drive_api/permission_id.cc
+++ b/service_apis/drive/google/drive_api/permission_id.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// PermissionId
// Documentation:
@@ -57,4 +54,6 @@ PermissionId::PermissionId(Json::Value* storage)
// Standard destructor.
PermissionId::~PermissionId() {
}
+
+// Properties.
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/permission_id.h b/service_apis/drive/google/drive_api/permission_id.h
index e822d93..1b16748 100644
--- a/service_apis/drive/google/drive_api/permission_id.h
+++ b/service_apis/drive/google/drive_api/permission_id.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_PERMISSION_ID_H_
#define GOOGLE_DRIVE_API_PERMISSION_ID_H_
diff --git a/service_apis/drive/google/drive_api/permission_list.cc b/service_apis/drive/google/drive_api/permission_list.cc
index 84e665a..93b8142 100644
--- a/service_apis/drive/google/drive_api/permission_list.cc
+++ b/service_apis/drive/google/drive_api/permission_list.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// PermissionList
// Documentation:
@@ -59,4 +56,16 @@ PermissionList::PermissionList(Json::Value* storage)
// Standard destructor.
PermissionList::~PermissionList() {
}
+
+// Properties.
+
+const client::JsonCppArray PermissionList::get_items() const {
+ const Json::Value& storage = Storage("items");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray PermissionList::mutable_items() {
+ Json::Value* storage = MutableStorage("items");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/permission_list.h b/service_apis/drive/google/drive_api/permission_list.h
index 0b73e0e..aea4f81 100644
--- a/service_apis/drive/google/drive_api/permission_list.h
+++ b/service_apis/drive/google/drive_api/permission_list.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_PERMISSION_LIST_H_
#define GOOGLE_DRIVE_API_PERMISSION_LIST_H_
@@ -145,7 +143,7 @@ class PermissionList : public client::JsonCppData {
/**
* Gets a reference to a mutable value of the 'items ' property.
*
- * The actual list of permissions.
+ * The list of permissions.
*
* @return The result can be modified to change the attribute value.
*/
@@ -188,6 +186,46 @@ class PermissionList : public client::JsonCppData {
*MutableStorage("kind") = value.data();
}
+ /**
+ * Determine if the 'nextPageToken ' attribute was set.
+ *
+ * @return true if the 'nextPageToken ' attribute was set.
+ */
+ bool has_next_page_token() const {
+ return Storage().isMember("nextPageToken");
+ }
+
+ /**
+ * Clears the 'nextPageToken ' attribute.
+ */
+ void clear_next_page_token() {
+ MutableStorage()->removeMember("nextPageToken");
+ }
+
+
+ /**
+ * Get the value of the 'nextPageToken ' attribute.
+ */
+ const StringPiece get_next_page_token() const {
+ const Json::Value& v = Storage("nextPageToken");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'nextPageToken ' attribute.
+ *
+ * The page token for the next page of permissions. This field will be absent
+ * if the end of the permissions list has been reached. If the token is
+ * rejected for any reason, it should be discarded, and pagination should be
+ * restarted from the first page of results.
+ *
+ * @param[in] value The new value.
+ */
+ void set_next_page_token(const StringPiece& value) {
+ *MutableStorage("nextPageToken") = value.data();
+ }
+
/**
* Determine if the 'selfLink ' attribute was set.
*
diff --git a/service_apis/drive/google/drive_api/property.cc b/service_apis/drive/google/drive_api/property.cc
index fd8bbe5..64b5669 100644
--- a/service_apis/drive/google/drive_api/property.cc
+++ b/service_apis/drive/google/drive_api/property.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// Property
// Documentation:
@@ -57,4 +54,6 @@ Property::Property(Json::Value* storage)
// Standard destructor.
Property::~Property() {
}
+
+// Properties.
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/property.h b/service_apis/drive/google/drive_api/property.h
index 085bfc7..c059187 100644
--- a/service_apis/drive/google/drive_api/property.h
+++ b/service_apis/drive/google/drive_api/property.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_PROPERTY_H_
#define GOOGLE_DRIVE_API_PROPERTY_H_
diff --git a/service_apis/drive/google/drive_api/property_list.cc b/service_apis/drive/google/drive_api/property_list.cc
index 6b1cd4d..05821c2 100644
--- a/service_apis/drive/google/drive_api/property_list.cc
+++ b/service_apis/drive/google/drive_api/property_list.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// PropertyList
// Documentation:
@@ -59,4 +56,16 @@ PropertyList::PropertyList(Json::Value* storage)
// Standard destructor.
PropertyList::~PropertyList() {
}
+
+// Properties.
+
+const client::JsonCppArray PropertyList::get_items() const {
+ const Json::Value& storage = Storage("items");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray PropertyList::mutable_items() {
+ Json::Value* storage = MutableStorage("items");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/property_list.h b/service_apis/drive/google/drive_api/property_list.h
index 6caf19b..e5a9536 100644
--- a/service_apis/drive/google/drive_api/property_list.h
+++ b/service_apis/drive/google/drive_api/property_list.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_PROPERTY_LIST_H_
#define GOOGLE_DRIVE_API_PROPERTY_LIST_H_
diff --git a/service_apis/drive/google/drive_api/revision.cc b/service_apis/drive/google/drive_api/revision.cc
index 4235961..653b5d3 100644
--- a/service_apis/drive/google/drive_api/revision.cc
+++ b/service_apis/drive/google/drive_api/revision.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// Revision
// Documentation:
@@ -61,4 +58,16 @@ Revision::Revision(Json::Value* storage)
// Standard destructor.
Revision::~Revision() {
}
+
+// Properties.
+
+const User Revision::get_last_modifying_user() const {
+ const Json::Value& storage = Storage("lastModifyingUser");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+User Revision::mutable_lastModifyingUser() {
+ Json::Value* storage = MutableStorage("lastModifyingUser");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/revision.h b/service_apis/drive/google/drive_api/revision.h
index d7bc0b3..af6b93c 100644
--- a/service_apis/drive/google/drive_api/revision.h
+++ b/service_apis/drive/google/drive_api/revision.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_REVISION_H_
#define GOOGLE_DRIVE_API_REVISION_H_
diff --git a/service_apis/drive/google/drive_api/revision_list.cc b/service_apis/drive/google/drive_api/revision_list.cc
index 1d25521..75f9983 100644
--- a/service_apis/drive/google/drive_api/revision_list.cc
+++ b/service_apis/drive/google/drive_api/revision_list.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// RevisionList
// Documentation:
@@ -59,4 +56,16 @@ RevisionList::RevisionList(Json::Value* storage)
// Standard destructor.
RevisionList::~RevisionList() {
}
+
+// Properties.
+
+const client::JsonCppArray RevisionList::get_items() const {
+ const Json::Value& storage = Storage("items");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray RevisionList::mutable_items() {
+ Json::Value* storage = MutableStorage("items");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/revision_list.h b/service_apis/drive/google/drive_api/revision_list.h
index 3c5fb81..679c7a6 100644
--- a/service_apis/drive/google/drive_api/revision_list.h
+++ b/service_apis/drive/google/drive_api/revision_list.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_REVISION_LIST_H_
#define GOOGLE_DRIVE_API_REVISION_LIST_H_
@@ -145,7 +143,8 @@ class RevisionList : public client::JsonCppData {
/**
* Gets a reference to a mutable value of the 'items ' property.
*
- * The actual list of revisions.
+ * The list of revisions. If nextPageToken is populated, then this list may be
+ * incomplete and an additional page of results should be fetched.
*
* @return The result can be modified to change the attribute value.
*/
@@ -188,6 +187,46 @@ class RevisionList : public client::JsonCppData {
*MutableStorage("kind") = value.data();
}
+ /**
+ * Determine if the 'nextPageToken ' attribute was set.
+ *
+ * @return true if the 'nextPageToken ' attribute was set.
+ */
+ bool has_next_page_token() const {
+ return Storage().isMember("nextPageToken");
+ }
+
+ /**
+ * Clears the 'nextPageToken ' attribute.
+ */
+ void clear_next_page_token() {
+ MutableStorage()->removeMember("nextPageToken");
+ }
+
+
+ /**
+ * Get the value of the 'nextPageToken ' attribute.
+ */
+ const StringPiece get_next_page_token() const {
+ const Json::Value& v = Storage("nextPageToken");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'nextPageToken ' attribute.
+ *
+ * The page token for the next page of revisions. This field will be absent if
+ * the end of the revisions list has been reached. If the token is rejected
+ * for any reason, it should be discarded and pagination should be restarted
+ * from the first page of results.
+ *
+ * @param[in] value The new value.
+ */
+ void set_next_page_token(const StringPiece& value) {
+ *MutableStorage("nextPageToken") = value.data();
+ }
+
/**
* Determine if the 'selfLink ' attribute was set.
*
diff --git a/service_apis/drive/google/drive_api/start_page_token.cc b/service_apis/drive/google/drive_api/start_page_token.cc
new file mode 100644
index 0000000..a1e0a21
--- /dev/null
+++ b/service_apis/drive/google/drive_api/start_page_token.cc
@@ -0,0 +1,59 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+// This code was generated by google-apis-code-generator 1.5.1
+
+// ----------------------------------------------------------------------------
+// NOTE: This file is generated from Google APIs Discovery Service.
+// Service:
+// Drive API (drive/v2)
+// Description:
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
+// Classes:
+// StartPageToken
+// Documentation:
+// https://developers.google.com/drive/
+
+#include "google/drive_api/start_page_token.h"
+#include
+#include "googleapis/client/data/jsoncpp_data.h"
+#include "googleapis/strings/stringpiece.h"
+
+
+#include
+#include "googleapis/strings/strcat.h"
+
+namespace google_drive_api {
+using namespace googleapis;
+
+
+// Object factory method (static).
+StartPageToken* StartPageToken::New() {
+ return new client::JsonCppCapsule;
+}
+
+// Standard immutable constructor.
+StartPageToken::StartPageToken(const Json::Value& storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard mutable constructor.
+StartPageToken::StartPageToken(Json::Value* storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard destructor.
+StartPageToken::~StartPageToken() {
+}
+
+// Properties.
+} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/start_page_token.h b/service_apis/drive/google/drive_api/start_page_token.h
new file mode 100644
index 0000000..37eac96
--- /dev/null
+++ b/service_apis/drive/google/drive_api/start_page_token.h
@@ -0,0 +1,161 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+// This code was generated by google-apis-code-generator 1.5.1
+
+// ----------------------------------------------------------------------------
+// NOTE: This file is generated from Google APIs Discovery Service.
+// Service:
+// Drive API (drive/v2)
+// Generated from:
+// Version: v2
+// Revision: 20170512
+// Generated by:
+// Tool: google-apis-code-generator 1.5.1
+// C++: 0.1.4
+#ifndef GOOGLE_DRIVE_API_START_PAGE_TOKEN_H_
+#define GOOGLE_DRIVE_API_START_PAGE_TOKEN_H_
+
+#include
+#include "googleapis/base/macros.h"
+#include "googleapis/client/data/jsoncpp_data.h"
+#include "googleapis/strings/stringpiece.h"
+
+namespace Json {
+class Value;
+} // namespace Json
+
+namespace google_drive_api {
+using namespace googleapis;
+
+/**
+ * No description provided.
+ *
+ * @ingroup DataObject
+ */
+class StartPageToken : public client::JsonCppData {
+ public:
+ /**
+ * Creates a new default instance.
+ *
+ * @return Ownership is passed back to the caller.
+ */
+ static StartPageToken* New();
+
+ /**
+ * Standard constructor for an immutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit StartPageToken(const Json::Value& storage);
+
+ /**
+ * Standard constructor for a mutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit StartPageToken(Json::Value* storage);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~StartPageToken();
+
+ /**
+ * Returns a string denoting the type of this data object.
+ *
+ * @return google_drive_api::StartPageToken
+ */
+ const StringPiece GetTypeName() const {
+ return StringPiece("google_drive_api::StartPageToken");
+ }
+
+ /**
+ * Determine if the 'kind ' attribute was set.
+ *
+ * @return true if the 'kind ' attribute was set.
+ */
+ bool has_kind() const {
+ return Storage().isMember("kind");
+ }
+
+ /**
+ * Clears the 'kind ' attribute.
+ */
+ void clear_kind() {
+ MutableStorage()->removeMember("kind");
+ }
+
+
+ /**
+ * Get the value of the 'kind ' attribute.
+ */
+ const StringPiece get_kind() const {
+ const Json::Value& v = Storage("kind");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'kind ' attribute.
+ *
+ * Identifies what kind of resource this is. Value: the fixed string
+ * "drive#startPageToken".
+ *
+ * @param[in] value The new value.
+ */
+ void set_kind(const StringPiece& value) {
+ *MutableStorage("kind") = value.data();
+ }
+
+ /**
+ * Determine if the 'startPageToken ' attribute was set.
+ *
+ * @return true if the 'startPageToken ' attribute was set.
+ */
+ bool has_start_page_token() const {
+ return Storage().isMember("startPageToken");
+ }
+
+ /**
+ * Clears the 'startPageToken ' attribute.
+ */
+ void clear_start_page_token() {
+ MutableStorage()->removeMember("startPageToken");
+ }
+
+
+ /**
+ * Get the value of the 'startPageToken ' attribute.
+ */
+ const StringPiece get_start_page_token() const {
+ const Json::Value& v = Storage("startPageToken");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'startPageToken ' attribute.
+ *
+ * The starting page token for listing changes.
+ *
+ * @param[in] value The new value.
+ */
+ void set_start_page_token(const StringPiece& value) {
+ *MutableStorage("startPageToken") = value.data();
+ }
+
+ private:
+ void operator=(const StartPageToken&);
+}; // StartPageToken
+} // namespace google_drive_api
+#endif // GOOGLE_DRIVE_API_START_PAGE_TOKEN_H_
diff --git a/service_apis/drive/google/drive_api/team_drive.cc b/service_apis/drive/google/drive_api/team_drive.cc
new file mode 100644
index 0000000..8621215
--- /dev/null
+++ b/service_apis/drive/google/drive_api/team_drive.cc
@@ -0,0 +1,101 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+// This code was generated by google-apis-code-generator 1.5.1
+
+// ----------------------------------------------------------------------------
+// NOTE: This file is generated from Google APIs Discovery Service.
+// Service:
+// Drive API (drive/v2)
+// Description:
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
+// Classes:
+// TeamDrive
+// Documentation:
+// https://developers.google.com/drive/
+
+#include "google/drive_api/team_drive.h"
+#include
+#include "googleapis/client/data/jsoncpp_data.h"
+#include "googleapis/strings/stringpiece.h"
+
+
+#include
+#include "googleapis/strings/strcat.h"
+
+namespace google_drive_api {
+using namespace googleapis;
+
+
+
+// Object factory method (static).
+TeamDrive::TeamDriveBackgroundImageFile* TeamDrive::TeamDriveBackgroundImageFile::New() {
+ return new client::JsonCppCapsule;
+}
+
+// Standard immutable constructor.
+TeamDrive::TeamDriveBackgroundImageFile::TeamDriveBackgroundImageFile(const Json::Value& storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard mutable constructor.
+TeamDrive::TeamDriveBackgroundImageFile::TeamDriveBackgroundImageFile(Json::Value* storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard destructor.
+TeamDrive::TeamDriveBackgroundImageFile::~TeamDriveBackgroundImageFile() {
+}
+
+// Properties.
+
+// Object factory method (static).
+TeamDrive::TeamDriveCapabilities* TeamDrive::TeamDriveCapabilities::New() {
+ return new client::JsonCppCapsule;
+}
+
+// Standard immutable constructor.
+TeamDrive::TeamDriveCapabilities::TeamDriveCapabilities(const Json::Value& storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard mutable constructor.
+TeamDrive::TeamDriveCapabilities::TeamDriveCapabilities(Json::Value* storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard destructor.
+TeamDrive::TeamDriveCapabilities::~TeamDriveCapabilities() {
+}
+
+// Properties.
+// Object factory method (static).
+TeamDrive* TeamDrive::New() {
+ return new client::JsonCppCapsule;
+}
+
+// Standard immutable constructor.
+TeamDrive::TeamDrive(const Json::Value& storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard mutable constructor.
+TeamDrive::TeamDrive(Json::Value* storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard destructor.
+TeamDrive::~TeamDrive() {
+}
+
+// Properties.
+} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/team_drive.h b/service_apis/drive/google/drive_api/team_drive.h
new file mode 100644
index 0000000..2911937
--- /dev/null
+++ b/service_apis/drive/google/drive_api/team_drive.h
@@ -0,0 +1,1175 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+// This code was generated by google-apis-code-generator 1.5.1
+
+// ----------------------------------------------------------------------------
+// NOTE: This file is generated from Google APIs Discovery Service.
+// Service:
+// Drive API (drive/v2)
+// Generated from:
+// Version: v2
+// Revision: 20170512
+// Generated by:
+// Tool: google-apis-code-generator 1.5.1
+// C++: 0.1.4
+#ifndef GOOGLE_DRIVE_API_TEAM_DRIVE_H_
+#define GOOGLE_DRIVE_API_TEAM_DRIVE_H_
+
+#include
+#include "googleapis/base/macros.h"
+#include "googleapis/client/data/jsoncpp_data.h"
+#include "googleapis/strings/stringpiece.h"
+
+namespace Json {
+class Value;
+} // namespace Json
+
+namespace google_drive_api {
+using namespace googleapis;
+
+/**
+ * Representation of a Team Drive.
+ *
+ * @ingroup DataObject
+ */
+class TeamDrive : public client::JsonCppData {
+ public:
+ /**
+ * An image file and cropping parameters from which a background image for
+ * this Team Drive is set. This is a write only field; it can only be set on
+ * drive.teamdrives.update requests that don't set themeId. When specified,
+ * all fields of the backgroundImageFile must be set.
+ *
+ * @ingroup DataObject
+ */
+ class TeamDriveBackgroundImageFile : public client::JsonCppData {
+ public:
+ /**
+ * Creates a new default instance.
+ *
+ * @return Ownership is passed back to the caller.
+ */
+ static TeamDriveBackgroundImageFile* New();
+
+ /**
+ * Standard constructor for an immutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit TeamDriveBackgroundImageFile(const Json::Value& storage);
+
+ /**
+ * Standard constructor for a mutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit TeamDriveBackgroundImageFile(Json::Value* storage);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~TeamDriveBackgroundImageFile();
+
+ /**
+ * Returns a string denoting the type of this data object.
+ *
+ * @return google_drive_api::TeamDriveBackgroundImageFile
+ */
+ const StringPiece GetTypeName() const {
+ return StringPiece("google_drive_api::TeamDriveBackgroundImageFile");
+ }
+
+ /**
+ * Determine if the 'id ' attribute was set.
+ *
+ * @return true if the 'id ' attribute was set.
+ */
+ bool has_id() const {
+ return Storage().isMember("id");
+ }
+
+ /**
+ * Clears the 'id ' attribute.
+ */
+ void clear_id() {
+ MutableStorage()->removeMember("id");
+ }
+
+
+ /**
+ * Get the value of the 'id ' attribute.
+ */
+ const StringPiece get_id() const {
+ const Json::Value& v = Storage("id");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'id ' attribute.
+ *
+ * The ID of an image file in Drive to use for the background image.
+ *
+ * @param[in] value The new value.
+ */
+ void set_id(const StringPiece& value) {
+ *MutableStorage("id") = value.data();
+ }
+
+ /**
+ * Determine if the 'width ' attribute was set.
+ *
+ * @return true if the 'width ' attribute was set.
+ */
+ bool has_width() const {
+ return Storage().isMember("width");
+ }
+
+ /**
+ * Clears the 'width ' attribute.
+ */
+ void clear_width() {
+ MutableStorage()->removeMember("width");
+ }
+
+
+ /**
+ * Get the value of the 'width ' attribute.
+ */
+ float get_width() const {
+ const Json::Value& storage = Storage("width");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'width ' attribute.
+ *
+ * The width of the cropped image in the closed range of 0 to 1. This value
+ * represents the width of the cropped image divided by the width of the
+ * entire image. The height is computed by applying a width to height aspect
+ * ratio of 80 to 9. The resulting image must be at least 1280 pixels wide
+ * and 144 pixels high.
+ *
+ * @param[in] value The new value.
+ */
+ void set_width(float value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("width"));
+ }
+
+ /**
+ * Determine if the 'xCoordinate ' attribute was set.
+ *
+ * @return true if the 'xCoordinate ' attribute was set.
+ */
+ bool has_x_coordinate() const {
+ return Storage().isMember("xCoordinate");
+ }
+
+ /**
+ * Clears the 'xCoordinate ' attribute.
+ */
+ void clear_x_coordinate() {
+ MutableStorage()->removeMember("xCoordinate");
+ }
+
+
+ /**
+ * Get the value of the 'xCoordinate ' attribute.
+ */
+ float get_x_coordinate() const {
+ const Json::Value& storage = Storage("xCoordinate");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'xCoordinate ' attribute.
+ *
+ * The X coordinate of the upper left corner of the cropping area in the
+ * background image. This is a value in the closed range of 0 to 1. This
+ * value represents the horizontal distance from the left side of the entire
+ * image to the left side of the cropping area divided by the width of the
+ * entire image.
+ *
+ * @param[in] value The new value.
+ */
+ void set_x_coordinate(float value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("xCoordinate"));
+ }
+
+ /**
+ * Determine if the 'yCoordinate ' attribute was set.
+ *
+ * @return true if the 'yCoordinate ' attribute was set.
+ */
+ bool has_y_coordinate() const {
+ return Storage().isMember("yCoordinate");
+ }
+
+ /**
+ * Clears the 'yCoordinate ' attribute.
+ */
+ void clear_y_coordinate() {
+ MutableStorage()->removeMember("yCoordinate");
+ }
+
+
+ /**
+ * Get the value of the 'yCoordinate ' attribute.
+ */
+ float get_y_coordinate() const {
+ const Json::Value& storage = Storage("yCoordinate");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'yCoordinate ' attribute.
+ *
+ * The Y coordinate of the upper left corner of the cropping area in the
+ * background image. This is a value in the closed range of 0 to 1. This
+ * value represents the vertical distance from the top side of the entire
+ * image to the top side of the cropping area divided by the height of the
+ * entire image.
+ *
+ * @param[in] value The new value.
+ */
+ void set_y_coordinate(float value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("yCoordinate"));
+ }
+
+ private:
+ void operator=(const TeamDriveBackgroundImageFile&);
+ }; // TeamDriveBackgroundImageFile
+ /**
+ * Capabilities the current user has on this Team Drive.
+ *
+ * @ingroup DataObject
+ */
+ class TeamDriveCapabilities : public client::JsonCppData {
+ public:
+ /**
+ * Creates a new default instance.
+ *
+ * @return Ownership is passed back to the caller.
+ */
+ static TeamDriveCapabilities* New();
+
+ /**
+ * Standard constructor for an immutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit TeamDriveCapabilities(const Json::Value& storage);
+
+ /**
+ * Standard constructor for a mutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit TeamDriveCapabilities(Json::Value* storage);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~TeamDriveCapabilities();
+
+ /**
+ * Returns a string denoting the type of this data object.
+ *
+ * @return google_drive_api::TeamDriveCapabilities
+ */
+ const StringPiece GetTypeName() const {
+ return StringPiece("google_drive_api::TeamDriveCapabilities");
+ }
+
+ /**
+ * Determine if the 'canAddChildren ' attribute was set.
+ *
+ * @return true if the 'canAddChildren ' attribute was set.
+ */
+ bool has_can_add_children() const {
+ return Storage().isMember("canAddChildren");
+ }
+
+ /**
+ * Clears the 'canAddChildren ' attribute.
+ */
+ void clear_can_add_children() {
+ MutableStorage()->removeMember("canAddChildren");
+ }
+
+
+ /**
+ * Get the value of the 'canAddChildren ' attribute.
+ */
+ bool get_can_add_children() const {
+ const Json::Value& storage = Storage("canAddChildren");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canAddChildren ' attribute.
+ *
+ * Whether the current user can add children to folders in this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_add_children(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canAddChildren"));
+ }
+
+ /**
+ * Determine if the 'canChangeTeamDriveBackground ' attribute
+ * was set.
+ *
+ * @return true if the 'canChangeTeamDriveBackground ' attribute
+ * was set.
+ */
+ bool has_can_change_team_drive_background() const {
+ return Storage().isMember("canChangeTeamDriveBackground");
+ }
+
+ /**
+ * Clears the 'canChangeTeamDriveBackground ' attribute.
+ */
+ void clear_can_change_team_drive_background() {
+ MutableStorage()->removeMember("canChangeTeamDriveBackground");
+ }
+
+
+ /**
+ * Get the value of the 'canChangeTeamDriveBackground '
+ * attribute.
+ */
+ bool get_can_change_team_drive_background() const {
+ const Json::Value& storage = Storage("canChangeTeamDriveBackground");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canChangeTeamDriveBackground ' attribute.
+ *
+ * Whether the current user can change the background of this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_change_team_drive_background(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canChangeTeamDriveBackground"));
+ }
+
+ /**
+ * Determine if the 'canComment ' attribute was set.
+ *
+ * @return true if the 'canComment ' attribute was set.
+ */
+ bool has_can_comment() const {
+ return Storage().isMember("canComment");
+ }
+
+ /**
+ * Clears the 'canComment ' attribute.
+ */
+ void clear_can_comment() {
+ MutableStorage()->removeMember("canComment");
+ }
+
+
+ /**
+ * Get the value of the 'canComment ' attribute.
+ */
+ bool get_can_comment() const {
+ const Json::Value& storage = Storage("canComment");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canComment ' attribute.
+ *
+ * Whether the current user can comment on files in this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_comment(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canComment"));
+ }
+
+ /**
+ * Determine if the 'canCopy ' attribute was set.
+ *
+ * @return true if the 'canCopy ' attribute was set.
+ */
+ bool has_can_copy() const {
+ return Storage().isMember("canCopy");
+ }
+
+ /**
+ * Clears the 'canCopy ' attribute.
+ */
+ void clear_can_copy() {
+ MutableStorage()->removeMember("canCopy");
+ }
+
+
+ /**
+ * Get the value of the 'canCopy ' attribute.
+ */
+ bool get_can_copy() const {
+ const Json::Value& storage = Storage("canCopy");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canCopy ' attribute.
+ *
+ * Whether the current user can copy files in this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_copy(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canCopy"));
+ }
+
+ /**
+ * Determine if the 'canDeleteTeamDrive ' attribute was set.
+ *
+ * @return true if the 'canDeleteTeamDrive ' attribute was set.
+ */
+ bool has_can_delete_team_drive() const {
+ return Storage().isMember("canDeleteTeamDrive");
+ }
+
+ /**
+ * Clears the 'canDeleteTeamDrive ' attribute.
+ */
+ void clear_can_delete_team_drive() {
+ MutableStorage()->removeMember("canDeleteTeamDrive");
+ }
+
+
+ /**
+ * Get the value of the 'canDeleteTeamDrive ' attribute.
+ */
+ bool get_can_delete_team_drive() const {
+ const Json::Value& storage = Storage("canDeleteTeamDrive");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canDeleteTeamDrive ' attribute.
+ *
+ * Whether the current user can delete this Team Drive. Attempting to delete
+ * the Team Drive may still fail if there are untrashed items inside the
+ * Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_delete_team_drive(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canDeleteTeamDrive"));
+ }
+
+ /**
+ * Determine if the 'canDownload ' attribute was set.
+ *
+ * @return true if the 'canDownload ' attribute was set.
+ */
+ bool has_can_download() const {
+ return Storage().isMember("canDownload");
+ }
+
+ /**
+ * Clears the 'canDownload ' attribute.
+ */
+ void clear_can_download() {
+ MutableStorage()->removeMember("canDownload");
+ }
+
+
+ /**
+ * Get the value of the 'canDownload ' attribute.
+ */
+ bool get_can_download() const {
+ const Json::Value& storage = Storage("canDownload");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canDownload ' attribute.
+ *
+ * Whether the current user can download files in this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_download(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canDownload"));
+ }
+
+ /**
+ * Determine if the 'canEdit ' attribute was set.
+ *
+ * @return true if the 'canEdit ' attribute was set.
+ */
+ bool has_can_edit() const {
+ return Storage().isMember("canEdit");
+ }
+
+ /**
+ * Clears the 'canEdit ' attribute.
+ */
+ void clear_can_edit() {
+ MutableStorage()->removeMember("canEdit");
+ }
+
+
+ /**
+ * Get the value of the 'canEdit ' attribute.
+ */
+ bool get_can_edit() const {
+ const Json::Value& storage = Storage("canEdit");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canEdit ' attribute.
+ *
+ * Whether the current user can edit files in this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_edit(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canEdit"));
+ }
+
+ /**
+ * Determine if the 'canListChildren ' attribute was set.
+ *
+ * @return true if the 'canListChildren ' attribute was set.
+ */
+ bool has_can_list_children() const {
+ return Storage().isMember("canListChildren");
+ }
+
+ /**
+ * Clears the 'canListChildren ' attribute.
+ */
+ void clear_can_list_children() {
+ MutableStorage()->removeMember("canListChildren");
+ }
+
+
+ /**
+ * Get the value of the 'canListChildren ' attribute.
+ */
+ bool get_can_list_children() const {
+ const Json::Value& storage = Storage("canListChildren");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canListChildren ' attribute.
+ *
+ * Whether the current user can list the children of folders in this Team
+ * Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_list_children(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canListChildren"));
+ }
+
+ /**
+ * Determine if the 'canManageMembers ' attribute was set.
+ *
+ * @return true if the 'canManageMembers ' attribute was set.
+ */
+ bool has_can_manage_members() const {
+ return Storage().isMember("canManageMembers");
+ }
+
+ /**
+ * Clears the 'canManageMembers ' attribute.
+ */
+ void clear_can_manage_members() {
+ MutableStorage()->removeMember("canManageMembers");
+ }
+
+
+ /**
+ * Get the value of the 'canManageMembers ' attribute.
+ */
+ bool get_can_manage_members() const {
+ const Json::Value& storage = Storage("canManageMembers");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canManageMembers ' attribute.
+ *
+ * Whether the current user can add members to this Team Drive or remove
+ * them or change their role.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_manage_members(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canManageMembers"));
+ }
+
+ /**
+ * Determine if the 'canReadRevisions ' attribute was set.
+ *
+ * @return true if the 'canReadRevisions ' attribute was set.
+ */
+ bool has_can_read_revisions() const {
+ return Storage().isMember("canReadRevisions");
+ }
+
+ /**
+ * Clears the 'canReadRevisions ' attribute.
+ */
+ void clear_can_read_revisions() {
+ MutableStorage()->removeMember("canReadRevisions");
+ }
+
+
+ /**
+ * Get the value of the 'canReadRevisions ' attribute.
+ */
+ bool get_can_read_revisions() const {
+ const Json::Value& storage = Storage("canReadRevisions");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canReadRevisions ' attribute.
+ *
+ * Whether the current user can read the revisions resource of files in this
+ * Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_read_revisions(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canReadRevisions"));
+ }
+
+ /**
+ * Determine if the 'canRemoveChildren ' attribute was set.
+ *
+ * @return true if the 'canRemoveChildren ' attribute was set.
+ */
+ bool has_can_remove_children() const {
+ return Storage().isMember("canRemoveChildren");
+ }
+
+ /**
+ * Clears the 'canRemoveChildren ' attribute.
+ */
+ void clear_can_remove_children() {
+ MutableStorage()->removeMember("canRemoveChildren");
+ }
+
+
+ /**
+ * Get the value of the 'canRemoveChildren ' attribute.
+ */
+ bool get_can_remove_children() const {
+ const Json::Value& storage = Storage("canRemoveChildren");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canRemoveChildren ' attribute.
+ *
+ * Whether the current user can remove children from folders in this Team
+ * Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_remove_children(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canRemoveChildren"));
+ }
+
+ /**
+ * Determine if the 'canRename ' attribute was set.
+ *
+ * @return true if the 'canRename ' attribute was set.
+ */
+ bool has_can_rename() const {
+ return Storage().isMember("canRename");
+ }
+
+ /**
+ * Clears the 'canRename ' attribute.
+ */
+ void clear_can_rename() {
+ MutableStorage()->removeMember("canRename");
+ }
+
+
+ /**
+ * Get the value of the 'canRename ' attribute.
+ */
+ bool get_can_rename() const {
+ const Json::Value& storage = Storage("canRename");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canRename ' attribute.
+ *
+ * Whether the current user can rename files or folders in this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_rename(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canRename"));
+ }
+
+ /**
+ * Determine if the 'canRenameTeamDrive ' attribute was set.
+ *
+ * @return true if the 'canRenameTeamDrive ' attribute was set.
+ */
+ bool has_can_rename_team_drive() const {
+ return Storage().isMember("canRenameTeamDrive");
+ }
+
+ /**
+ * Clears the 'canRenameTeamDrive ' attribute.
+ */
+ void clear_can_rename_team_drive() {
+ MutableStorage()->removeMember("canRenameTeamDrive");
+ }
+
+
+ /**
+ * Get the value of the 'canRenameTeamDrive ' attribute.
+ */
+ bool get_can_rename_team_drive() const {
+ const Json::Value& storage = Storage("canRenameTeamDrive");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canRenameTeamDrive ' attribute.
+ *
+ * Whether the current user can rename this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_rename_team_drive(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canRenameTeamDrive"));
+ }
+
+ /**
+ * Determine if the 'canShare ' attribute was set.
+ *
+ * @return true if the 'canShare ' attribute was set.
+ */
+ bool has_can_share() const {
+ return Storage().isMember("canShare");
+ }
+
+ /**
+ * Clears the 'canShare ' attribute.
+ */
+ void clear_can_share() {
+ MutableStorage()->removeMember("canShare");
+ }
+
+
+ /**
+ * Get the value of the 'canShare ' attribute.
+ */
+ bool get_can_share() const {
+ const Json::Value& storage = Storage("canShare");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Change the 'canShare ' attribute.
+ *
+ * Whether the current user can share files or folders in this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_can_share(bool value) {
+ client::SetJsonValueFromCppValueHelper(
+ value, MutableStorage("canShare"));
+ }
+
+ private:
+ void operator=(const TeamDriveCapabilities&);
+ }; // TeamDriveCapabilities
+ /**
+ * Creates a new default instance.
+ *
+ * @return Ownership is passed back to the caller.
+ */
+ static TeamDrive* New();
+
+ /**
+ * Standard constructor for an immutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit TeamDrive(const Json::Value& storage);
+
+ /**
+ * Standard constructor for a mutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit TeamDrive(Json::Value* storage);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~TeamDrive();
+
+ /**
+ * Returns a string denoting the type of this data object.
+ *
+ * @return google_drive_api::TeamDrive
+ */
+ const StringPiece GetTypeName() const {
+ return StringPiece("google_drive_api::TeamDrive");
+ }
+
+ /**
+ * Determine if the 'backgroundImageFile ' attribute was set.
+ *
+ * @return true if the 'backgroundImageFile ' attribute was set.
+ */
+ bool has_background_image_file() const {
+ return Storage().isMember("backgroundImageFile");
+ }
+
+ /**
+ * Clears the 'backgroundImageFile ' attribute.
+ */
+ void clear_background_image_file() {
+ MutableStorage()->removeMember("backgroundImageFile");
+ }
+
+
+ /**
+ * Get a reference to the value of the 'backgroundImageFile '
+ * attribute.
+ */
+ const TeamDriveBackgroundImageFile get_background_image_file() const {
+ const Json::Value& storage = Storage("backgroundImageFile");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Gets a reference to a mutable value of the
+ * 'backgroundImageFile ' property.
+ *
+ * An image file and cropping parameters from which a background image for
+ * this Team Drive is set. This is a write only field; it can only be set on
+ * drive.teamdrives.update requests that don't set themeId. When specified,
+ * all fields of the backgroundImageFile must be set.
+ *
+ * @return The result can be modified to change the attribute value.
+ */
+ TeamDriveBackgroundImageFile mutable_backgroundImageFile() {
+ Json::Value* storage = MutableStorage("backgroundImageFile");
+ return client::JsonValueToMutableCppValueHelper(storage);
+ }
+
+ /**
+ * Determine if the 'backgroundImageLink ' attribute was set.
+ *
+ * @return true if the 'backgroundImageLink ' attribute was set.
+ */
+ bool has_background_image_link() const {
+ return Storage().isMember("backgroundImageLink");
+ }
+
+ /**
+ * Clears the 'backgroundImageLink ' attribute.
+ */
+ void clear_background_image_link() {
+ MutableStorage()->removeMember("backgroundImageLink");
+ }
+
+
+ /**
+ * Get the value of the 'backgroundImageLink ' attribute.
+ */
+ const StringPiece get_background_image_link() const {
+ const Json::Value& v = Storage("backgroundImageLink");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'backgroundImageLink ' attribute.
+ *
+ * A short-lived link to this Team Drive's background image.
+ *
+ * @param[in] value The new value.
+ */
+ void set_background_image_link(const StringPiece& value) {
+ *MutableStorage("backgroundImageLink") = value.data();
+ }
+
+ /**
+ * Determine if the 'capabilities ' attribute was set.
+ *
+ * @return true if the 'capabilities ' attribute was set.
+ */
+ bool has_capabilities() const {
+ return Storage().isMember("capabilities");
+ }
+
+ /**
+ * Clears the 'capabilities ' attribute.
+ */
+ void clear_capabilities() {
+ MutableStorage()->removeMember("capabilities");
+ }
+
+
+ /**
+ * Get a reference to the value of the 'capabilities ' attribute.
+ */
+ const TeamDriveCapabilities get_capabilities() const {
+ const Json::Value& storage = Storage("capabilities");
+ return client::JsonValueToCppValueHelper(storage);
+ }
+
+ /**
+ * Gets a reference to a mutable value of the 'capabilities '
+ * property.
+ *
+ * Capabilities the current user has on this Team Drive.
+ *
+ * @return The result can be modified to change the attribute value.
+ */
+ TeamDriveCapabilities mutable_capabilities() {
+ Json::Value* storage = MutableStorage("capabilities");
+ return client::JsonValueToMutableCppValueHelper(storage);
+ }
+
+ /**
+ * Determine if the 'colorRgb ' attribute was set.
+ *
+ * @return true if the 'colorRgb ' attribute was set.
+ */
+ bool has_color_rgb() const {
+ return Storage().isMember("colorRgb");
+ }
+
+ /**
+ * Clears the 'colorRgb ' attribute.
+ */
+ void clear_color_rgb() {
+ MutableStorage()->removeMember("colorRgb");
+ }
+
+
+ /**
+ * Get the value of the 'colorRgb ' attribute.
+ */
+ const StringPiece get_color_rgb() const {
+ const Json::Value& v = Storage("colorRgb");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'colorRgb ' attribute.
+ *
+ * The color of this Team Drive as an RGB hex string. It can only be set on a
+ * drive.teamdrives.update request that does not set themeId.
+ *
+ * @param[in] value The new value.
+ */
+ void set_color_rgb(const StringPiece& value) {
+ *MutableStorage("colorRgb") = value.data();
+ }
+
+ /**
+ * Determine if the 'id ' attribute was set.
+ *
+ * @return true if the 'id ' attribute was set.
+ */
+ bool has_id() const {
+ return Storage().isMember("id");
+ }
+
+ /**
+ * Clears the 'id ' attribute.
+ */
+ void clear_id() {
+ MutableStorage()->removeMember("id");
+ }
+
+
+ /**
+ * Get the value of the 'id ' attribute.
+ */
+ const StringPiece get_id() const {
+ const Json::Value& v = Storage("id");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'id ' attribute.
+ *
+ * The ID of this Team Drive which is also the ID of the top level folder for
+ * this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_id(const StringPiece& value) {
+ *MutableStorage("id") = value.data();
+ }
+
+ /**
+ * Determine if the 'kind ' attribute was set.
+ *
+ * @return true if the 'kind ' attribute was set.
+ */
+ bool has_kind() const {
+ return Storage().isMember("kind");
+ }
+
+ /**
+ * Clears the 'kind ' attribute.
+ */
+ void clear_kind() {
+ MutableStorage()->removeMember("kind");
+ }
+
+
+ /**
+ * Get the value of the 'kind ' attribute.
+ */
+ const StringPiece get_kind() const {
+ const Json::Value& v = Storage("kind");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'kind ' attribute.
+ *
+ * This is always drive#teamDrive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_kind(const StringPiece& value) {
+ *MutableStorage("kind") = value.data();
+ }
+
+ /**
+ * Determine if the 'name ' attribute was set.
+ *
+ * @return true if the 'name ' attribute was set.
+ */
+ bool has_name() const {
+ return Storage().isMember("name");
+ }
+
+ /**
+ * Clears the 'name ' attribute.
+ */
+ void clear_name() {
+ MutableStorage()->removeMember("name");
+ }
+
+
+ /**
+ * Get the value of the 'name ' attribute.
+ */
+ const StringPiece get_name() const {
+ const Json::Value& v = Storage("name");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'name ' attribute.
+ *
+ * The name of this Team Drive.
+ *
+ * @param[in] value The new value.
+ */
+ void set_name(const StringPiece& value) {
+ *MutableStorage("name") = value.data();
+ }
+
+ /**
+ * Determine if the 'themeId ' attribute was set.
+ *
+ * @return true if the 'themeId ' attribute was set.
+ */
+ bool has_theme_id() const {
+ return Storage().isMember("themeId");
+ }
+
+ /**
+ * Clears the 'themeId ' attribute.
+ */
+ void clear_theme_id() {
+ MutableStorage()->removeMember("themeId");
+ }
+
+
+ /**
+ * Get the value of the 'themeId ' attribute.
+ */
+ const StringPiece get_theme_id() const {
+ const Json::Value& v = Storage("themeId");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'themeId ' attribute.
+ *
+ * The ID of the theme from which the background image and color will be set.
+ * The set of possible teamDriveThemes can be retrieved from a drive.about.get
+ * response. When not specified on a drive.teamdrives.insert request, a random
+ * theme is chosen from which the background image and color are set. This is
+ * a write-only field; it can only be set on requests that don't set colorRgb
+ * or backgroundImageFile.
+ *
+ * @param[in] value The new value.
+ */
+ void set_theme_id(const StringPiece& value) {
+ *MutableStorage("themeId") = value.data();
+ }
+
+ private:
+ void operator=(const TeamDrive&);
+}; // TeamDrive
+} // namespace google_drive_api
+#endif // GOOGLE_DRIVE_API_TEAM_DRIVE_H_
diff --git a/service_apis/drive/google/drive_api/team_drive_list.cc b/service_apis/drive/google/drive_api/team_drive_list.cc
new file mode 100644
index 0000000..3e93927
--- /dev/null
+++ b/service_apis/drive/google/drive_api/team_drive_list.cc
@@ -0,0 +1,71 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+// This code was generated by google-apis-code-generator 1.5.1
+
+// ----------------------------------------------------------------------------
+// NOTE: This file is generated from Google APIs Discovery Service.
+// Service:
+// Drive API (drive/v2)
+// Description:
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
+// Classes:
+// TeamDriveList
+// Documentation:
+// https://developers.google.com/drive/
+
+#include "google/drive_api/team_drive_list.h"
+#include
+#include "googleapis/client/data/jsoncpp_data.h"
+#include "googleapis/strings/stringpiece.h"
+
+#include "google/drive_api/team_drive.h"
+
+
+#include
+#include "googleapis/strings/strcat.h"
+
+namespace google_drive_api {
+using namespace googleapis;
+
+
+// Object factory method (static).
+TeamDriveList* TeamDriveList::New() {
+ return new client::JsonCppCapsule;
+}
+
+// Standard immutable constructor.
+TeamDriveList::TeamDriveList(const Json::Value& storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard mutable constructor.
+TeamDriveList::TeamDriveList(Json::Value* storage)
+ : client::JsonCppData(storage) {
+}
+
+// Standard destructor.
+TeamDriveList::~TeamDriveList() {
+}
+
+// Properties.
+
+const client::JsonCppArray TeamDriveList::get_items() const {
+ const Json::Value& storage = Storage("items");
+ return client::JsonValueToCppValueHelper >(storage);
+}
+
+client::JsonCppArray TeamDriveList::mutable_items() {
+ Json::Value* storage = MutableStorage("items");
+ return client::JsonValueToMutableCppValueHelper >(storage);
+}
+} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/team_drive_list.h b/service_apis/drive/google/drive_api/team_drive_list.h
new file mode 100644
index 0000000..dc36c11
--- /dev/null
+++ b/service_apis/drive/google/drive_api/team_drive_list.h
@@ -0,0 +1,193 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+// This code was generated by google-apis-code-generator 1.5.1
+
+// ----------------------------------------------------------------------------
+// NOTE: This file is generated from Google APIs Discovery Service.
+// Service:
+// Drive API (drive/v2)
+// Generated from:
+// Version: v2
+// Revision: 20170512
+// Generated by:
+// Tool: google-apis-code-generator 1.5.1
+// C++: 0.1.4
+#ifndef GOOGLE_DRIVE_API_TEAM_DRIVE_LIST_H_
+#define GOOGLE_DRIVE_API_TEAM_DRIVE_LIST_H_
+
+#include
+#include "googleapis/base/macros.h"
+#include "googleapis/client/data/jsoncpp_data.h"
+#include "googleapis/strings/stringpiece.h"
+
+#include "google/drive_api/team_drive.h"
+
+namespace Json {
+class Value;
+} // namespace Json
+
+namespace google_drive_api {
+using namespace googleapis;
+
+/**
+ * A list of Team Drives.
+ *
+ * @ingroup DataObject
+ */
+class TeamDriveList : public client::JsonCppData {
+ public:
+ /**
+ * Creates a new default instance.
+ *
+ * @return Ownership is passed back to the caller.
+ */
+ static TeamDriveList* New();
+
+ /**
+ * Standard constructor for an immutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit TeamDriveList(const Json::Value& storage);
+
+ /**
+ * Standard constructor for a mutable data object instance.
+ *
+ * @param[in] storage The underlying data storage for this instance.
+ */
+ explicit TeamDriveList(Json::Value* storage);
+
+ /**
+ * Standard destructor.
+ */
+ virtual ~TeamDriveList();
+
+ /**
+ * Returns a string denoting the type of this data object.
+ *
+ * @return google_drive_api::TeamDriveList
+ */
+ const StringPiece GetTypeName() const {
+ return StringPiece("google_drive_api::TeamDriveList");
+ }
+
+ /**
+ * Determine if the 'items ' attribute was set.
+ *
+ * @return true if the 'items ' attribute was set.
+ */
+ bool has_items() const {
+ return Storage().isMember("items");
+ }
+
+ /**
+ * Clears the 'items ' attribute.
+ */
+ void clear_items() {
+ MutableStorage()->removeMember("items");
+ }
+
+
+ /**
+ * Get a reference to the value of the 'items ' attribute.
+ */
+ const client::JsonCppArray get_items() const;
+
+ /**
+ * Gets a reference to a mutable value of the 'items ' property.
+ *
+ * The list of Team Drives.
+ *
+ * @return The result can be modified to change the attribute value.
+ */
+ client::JsonCppArray mutable_items();
+
+ /**
+ * Determine if the 'kind ' attribute was set.
+ *
+ * @return true if the 'kind ' attribute was set.
+ */
+ bool has_kind() const {
+ return Storage().isMember("kind");
+ }
+
+ /**
+ * Clears the 'kind ' attribute.
+ */
+ void clear_kind() {
+ MutableStorage()->removeMember("kind");
+ }
+
+
+ /**
+ * Get the value of the 'kind ' attribute.
+ */
+ const StringPiece get_kind() const {
+ const Json::Value& v = Storage("kind");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'kind ' attribute.
+ *
+ * This is always drive#teamDriveList.
+ *
+ * @param[in] value The new value.
+ */
+ void set_kind(const StringPiece& value) {
+ *MutableStorage("kind") = value.data();
+ }
+
+ /**
+ * Determine if the 'nextPageToken ' attribute was set.
+ *
+ * @return true if the 'nextPageToken ' attribute was set.
+ */
+ bool has_next_page_token() const {
+ return Storage().isMember("nextPageToken");
+ }
+
+ /**
+ * Clears the 'nextPageToken ' attribute.
+ */
+ void clear_next_page_token() {
+ MutableStorage()->removeMember("nextPageToken");
+ }
+
+
+ /**
+ * Get the value of the 'nextPageToken ' attribute.
+ */
+ const StringPiece get_next_page_token() const {
+ const Json::Value& v = Storage("nextPageToken");
+ if (v == Json::Value::null) return StringPiece("");
+ return StringPiece(v.asCString());
+ }
+
+ /**
+ * Change the 'nextPageToken ' attribute.
+ *
+ * The page token for the next page of Team Drives.
+ *
+ * @param[in] value The new value.
+ */
+ void set_next_page_token(const StringPiece& value) {
+ *MutableStorage("nextPageToken") = value.data();
+ }
+
+ private:
+ void operator=(const TeamDriveList&);
+}; // TeamDriveList
+} // namespace google_drive_api
+#endif // GOOGLE_DRIVE_API_TEAM_DRIVE_LIST_H_
diff --git a/service_apis/drive/google/drive_api/user.cc b/service_apis/drive/google/drive_api/user.cc
index 02b8787..b2f6752 100644
--- a/service_apis/drive/google/drive_api/user.cc
+++ b/service_apis/drive/google/drive_api/user.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// Drive API (drive/v2)
// Description:
-// The API to interact with Drive.
+// Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
// Classes:
// User
// Documentation:
@@ -58,6 +55,8 @@ User::UserPicture::UserPicture(Json::Value* storage)
// Standard destructor.
User::UserPicture::~UserPicture() {
}
+
+// Properties.
// Object factory method (static).
User* User::New() {
return new client::JsonCppCapsule;
@@ -76,4 +75,6 @@ User::User(Json::Value* storage)
// Standard destructor.
User::~User() {
}
+
+// Properties.
} // namespace google_drive_api
diff --git a/service_apis/drive/google/drive_api/user.h b/service_apis/drive/google/drive_api/user.h
index 28f3f2d..3f2817b 100644
--- a/service_apis/drive/google/drive_api/user.h
+++ b/service_apis/drive/google/drive_api/user.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// Drive API (drive/v2)
// Generated from:
// Version: v2
+// Revision: 20170512
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_DRIVE_API_USER_H_
#define GOOGLE_DRIVE_API_USER_H_
diff --git a/service_apis/youtube/descriptor.json b/service_apis/youtube/descriptor.json
deleted file mode 100644
index 2efa8d7..0000000
--- a/service_apis/youtube/descriptor.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "discoveryLink": "./apis/youtube/v3/rest",
- "kind": "discovery#directoryItem",
- "description": "Programmatic access to YouTube features.",
- "title": "YouTube Data API",
- "discoveryRestUrl": "https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest",
- "preferred": true,
- "version": "v3",
- "icons": {
- "x32": "https://www.google.com/images/icons/product/youtube-32.png",
- "x16": "https://www.google.com/images/icons/product/youtube-16.png"
- },
- "documentationLink": "https://developers.google.com/youtube/v3",
- "id": "youtube:v3",
- "name": "youtube",
- "packagePath": null,
- "canonicalName": "YouTube",
- "files": [
- {
- "downloadUrl": "/downloads/youtube/v3/158/cpp/0.1.3/google-youtube-v3-rev158-cpp-0.1.3-doc.zip",
- "path": "google-youtube-v3-rev158-cpp-0.1.3-doc.zip",
- "type": "documentation",
- "timestamp": "2016-01-07 03:26"
- },
- {
- "downloadUrl": "/downloads/youtube/v3/158/cpp/0.1.3/google-youtube-v3-rev158-cpp-0.1.3-src.zip",
- "path": "",
- "type": "source",
- "timestamp": "2016-01-08 00:11"
- }
- ],
- "revision": 158,
- "language": "cpp",
- "language_version": "0.1.3"
-}
\ No newline at end of file
diff --git a/service_apis/youtube/google/youtube_api/CMakeLists.txt b/service_apis/youtube/google/youtube_api/CMakeLists.txt
index 2da764d..fee8bb4 100644
--- a/service_apis/youtube/google/youtube_api/CMakeLists.txt
+++ b/service_apis/youtube/google/youtube_api/CMakeLists.txt
@@ -38,7 +38,6 @@ add_library(google_youtube_api STATIC
channel_content_owner_details.cc
channel_conversion_ping.cc
channel_conversion_pings.cc
- channel_id.cc
channel_list_response.cc
channel_localization.cc
channel_profile_details.cc
@@ -95,12 +94,21 @@ add_library(google_youtube_api STATIC
live_chat_fan_funding_event_details.cc
live_chat_message.cc
live_chat_message_author_details.cc
+ live_chat_message_deleted_details.cc
live_chat_message_list_response.cc
+ live_chat_message_retracted_details.cc
live_chat_message_snippet.cc
live_chat_moderator.cc
live_chat_moderator_list_response.cc
live_chat_moderator_snippet.cc
+ live_chat_poll_closed_details.cc
+ live_chat_poll_edited_details.cc
+ live_chat_poll_item.cc
+ live_chat_poll_opened_details.cc
+ live_chat_poll_voted_details.cc
+ live_chat_super_chat_details.cc
live_chat_text_message_details.cc
+ live_chat_user_banned_message_details.cc
live_stream.cc
live_stream_configuration_issue.cc
live_stream_content_details.cc
@@ -139,6 +147,9 @@ add_library(google_youtube_api STATIC
subscription_list_response.cc
subscription_snippet.cc
subscription_subscriber_snippet.cc
+ super_chat_event.cc
+ super_chat_event_list_response.cc
+ super_chat_event_snippet.cc
thumbnail.cc
thumbnail_details.cc
thumbnail_set_response.cc
@@ -155,8 +166,6 @@ add_library(google_youtube_api STATIC
video_category_snippet.cc
video_content_details.cc
video_content_details_region_restriction.cc
- video_conversion_ping.cc
- video_conversion_pings.cc
video_file_details.cc
video_file_details_audio_stream.cc
video_file_details_video_stream.cc
diff --git a/service_apis/youtube/google/youtube_api/access_policy.cc b/service_apis/youtube/google/youtube_api/access_policy.cc
index 8457173..b51ce1f 100644
--- a/service_apis/youtube/google/youtube_api/access_policy.cc
+++ b/service_apis/youtube/google/youtube_api/access_policy.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// YouTube Data API (youtube/v3)
// Description:
-// Programmatic access to YouTube features.
+// Supports core YouTube features, such as uploading videos, creating and managing playlists, searching for content, and much more.
// Classes:
// AccessPolicy
// Documentation:
@@ -57,4 +54,6 @@ AccessPolicy::AccessPolicy(Json::Value* storage)
// Standard destructor.
AccessPolicy::~AccessPolicy() {
}
+
+// Properties.
} // namespace google_youtube_api
diff --git a/service_apis/youtube/google/youtube_api/access_policy.h b/service_apis/youtube/google/youtube_api/access_policy.h
index 993eea9..3322070 100644
--- a/service_apis/youtube/google/youtube_api/access_policy.h
+++ b/service_apis/youtube/google/youtube_api/access_policy.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// YouTube Data API (youtube/v3)
// Generated from:
// Version: v3
+// Revision: 20170130
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_YOUTUBE_API_ACCESS_POLICY_H_
#define GOOGLE_YOUTUBE_API_ACCESS_POLICY_H_
diff --git a/service_apis/youtube/google/youtube_api/activity.cc b/service_apis/youtube/google/youtube_api/activity.cc
index d13e313..5daa80a 100644
--- a/service_apis/youtube/google/youtube_api/activity.cc
+++ b/service_apis/youtube/google/youtube_api/activity.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// YouTube Data API (youtube/v3)
// Description:
-// Programmatic access to YouTube features.
+// Supports core YouTube features, such as uploading videos, creating and managing playlists, searching for content, and much more.
// Classes:
// Activity
// Documentation:
@@ -60,4 +57,26 @@ Activity::Activity(Json::Value* storage)
// Standard destructor.
Activity::~Activity() {
}
+
+// Properties.
+
+const ActivityContentDetails Activity::get_content_details() const {
+ const Json::Value& storage = Storage("contentDetails");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+ActivityContentDetails Activity::mutable_contentDetails() {
+ Json::Value* storage = MutableStorage("contentDetails");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const ActivitySnippet Activity::get_snippet() const {
+ const Json::Value& storage = Storage("snippet");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+ActivitySnippet Activity::mutable_snippet() {
+ Json::Value* storage = MutableStorage("snippet");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
} // namespace google_youtube_api
diff --git a/service_apis/youtube/google/youtube_api/activity.h b/service_apis/youtube/google/youtube_api/activity.h
index 8831a94..0b921e3 100644
--- a/service_apis/youtube/google/youtube_api/activity.h
+++ b/service_apis/youtube/google/youtube_api/activity.h
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,7 +11,6 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
@@ -21,9 +18,10 @@
// YouTube Data API (youtube/v3)
// Generated from:
// Version: v3
+// Revision: 20170130
// Generated by:
// Tool: google-apis-code-generator 1.5.1
-// C++: 0.1.3
+// C++: 0.1.4
#ifndef GOOGLE_YOUTUBE_API_ACTIVITY_H_
#define GOOGLE_YOUTUBE_API_ACTIVITY_H_
diff --git a/service_apis/youtube/google/youtube_api/activity_content_details.cc b/service_apis/youtube/google/youtube_api/activity_content_details.cc
index 6a6591d..da869ac 100644
--- a/service_apis/youtube/google/youtube_api/activity_content_details.cc
+++ b/service_apis/youtube/google/youtube_api/activity_content_details.cc
@@ -1,5 +1,3 @@
-// Copyright 2010 Google Inc.
-//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
@@ -13,14 +11,13 @@
// the License.
// This code was generated by google-apis-code-generator 1.5.1
-// C++ generator version: 0.1.3
// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
// YouTube Data API (youtube/v3)
// Description:
-// Programmatic access to YouTube features.
+// Supports core YouTube features, such as uploading videos, creating and managing playlists, searching for content, and much more.
// Classes:
// ActivityContentDetails
// Documentation:
@@ -68,4 +65,116 @@ ActivityContentDetails::ActivityContentDetails(Json::Value* storage)
// Standard destructor.
ActivityContentDetails::~ActivityContentDetails() {
}
+
+// Properties.
+
+const ActivityContentDetailsBulletin ActivityContentDetails::get_bulletin() const {
+ const Json::Value& storage = Storage("bulletin");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+ActivityContentDetailsBulletin ActivityContentDetails::mutable_bulletin() {
+ Json::Value* storage = MutableStorage("bulletin");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const ActivityContentDetailsChannelItem ActivityContentDetails::get_channel_item() const {
+ const Json::Value& storage = Storage("channelItem");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+ActivityContentDetailsChannelItem ActivityContentDetails::mutable_channelItem() {
+ Json::Value* storage = MutableStorage("channelItem");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const ActivityContentDetailsComment ActivityContentDetails::get_comment() const {
+ const Json::Value& storage = Storage("comment");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+ActivityContentDetailsComment ActivityContentDetails::mutable_comment() {
+ Json::Value* storage = MutableStorage("comment");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const ActivityContentDetailsFavorite ActivityContentDetails::get_favorite() const {
+ const Json::Value& storage = Storage("favorite");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+ActivityContentDetailsFavorite ActivityContentDetails::mutable_favorite() {
+ Json::Value* storage = MutableStorage("favorite");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const ActivityContentDetailsLike ActivityContentDetails::get_like() const {
+ const Json::Value& storage = Storage("like");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+ActivityContentDetailsLike ActivityContentDetails::mutable_like() {
+ Json::Value* storage = MutableStorage("like");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const ActivityContentDetailsPlaylistItem ActivityContentDetails::get_playlist_item() const {
+ const Json::Value& storage = Storage("playlistItem");
+ return client::JsonValueToCppValueHelper(storage);
+}
+
+ActivityContentDetailsPlaylistItem ActivityContentDetails::mutable_playlistItem() {
+ Json::Value* storage = MutableStorage("playlistItem");
+ return client::JsonValueToMutableCppValueHelper(storage);
+}
+
+const ActivityContentDetailsPromotedItem ActivityContentDetails::get_promoted_item() const {
+ const Json::Value& storage = Storage("promotedItem");
+ return client::JsonValueToCppValueHelper |
---|