drive
v2
|
#include <drive_service.h>
Public Member Functions | |
FilesResource_UpdateMethod (const DriveService *_service_, client::AuthorizationCredential *_credential_, const absl::string_view &file_id) | |
FilesResource_UpdateMethod (const DriveService *_service_, client::AuthorizationCredential *_credential_, const absl::string_view &file_id, const File *_metadata_, const StringPiece &_media_content_type_, client::DataReader *_media_content_reader_) | |
virtual | ~FilesResource_UpdateMethod () |
void | clear_add_parents () |
const string & | get_add_parents () const |
string * | mutable_addParents () |
void | set_add_parents (const string &value) |
void | clear_convert () |
bool | get_convert () const |
void | set_convert (bool value) |
void | clear_enforce_single_parent () |
bool | get_enforce_single_parent () const |
void | set_enforce_single_parent (bool value) |
void | clear_modified_date_behavior () |
const string & | get_modified_date_behavior () const |
string * | mutable_modifiedDateBehavior () |
void | set_modified_date_behavior (const string &value) |
void | clear_new_revision () |
bool | get_new_revision () const |
void | set_new_revision (bool value) |
void | clear_ocr () |
bool | get_ocr () const |
void | set_ocr (bool value) |
void | clear_ocr_language () |
const string & | get_ocr_language () const |
string * | mutable_ocrLanguage () |
void | set_ocr_language (const string &value) |
void | clear_pinned () |
bool | get_pinned () const |
void | set_pinned (bool value) |
void | clear_remove_parents () |
const string & | get_remove_parents () const |
string * | mutable_removeParents () |
void | set_remove_parents (const string &value) |
void | clear_set_modified_date () |
bool | get_set_modified_date () const |
void | set_set_modified_date (bool value) |
void | clear_supports_all_drives () |
bool | get_supports_all_drives () const |
void | set_supports_all_drives (bool value) |
void | clear_supports_team_drives () |
bool | get_supports_team_drives () const |
void | set_supports_team_drives (bool value) |
void | clear_timed_text_language () |
const string & | get_timed_text_language () const |
string * | mutable_timedTextLanguage () |
void | set_timed_text_language (const string &value) |
void | clear_timed_text_track_name () |
const string & | get_timed_text_track_name () const |
string * | mutable_timedTextTrackName () |
void | set_timed_text_track_name (const string &value) |
void | clear_update_viewed_date () |
bool | get_update_viewed_date () const |
void | set_update_viewed_date (bool value) |
void | clear_use_content_as_indexable_text () |
bool | get_use_content_as_indexable_text () const |
void | set_use_content_as_indexable_text (bool value) |
virtual util::Status | AppendVariable (const StringPiece &variable_name, const client::UriTemplateConfig &config, string *target) |
virtual util::Status | AppendOptionalQueryParameters (string *target) |
util::Status | ExecuteAndParseResponse (File *data) |
![]() | |
DriveServiceBaseRequest (const client::ClientService *service, client::AuthorizationCredential *credential, client::HttpRequest::HttpMethod method, const StringPiece &uri_template) | |
virtual | ~DriveServiceBaseRequest () |
void | clear_alt () |
const string & | get_alt () const |
string * | mutable_alt () |
void | set_alt (const string &value) |
void | clear_fields () |
const string & | get_fields () const |
string * | mutable_fields () |
void | set_fields (const string &value) |
void | clear_key () |
const string & | get_key () const |
string * | mutable_key () |
void | set_key (const string &value) |
void | clear_oauth_token () |
const string & | get_oauth_token () const |
string * | mutable_oauthToken () |
void | set_oauth_token (const string &value) |
void | clear_pretty_print () |
bool | get_pretty_print () const |
void | set_pretty_print (bool value) |
void | clear_quota_user () |
const string & | get_quota_user () const |
string * | mutable_quotaUser () |
void | set_quota_user (const string &value) |
void | clear_user_ip () |
const string & | get_user_ip () const |
string * | mutable_userIp () |
void | set_user_ip (const string &value) |
Static Public Attributes | |
static const client::MediaUploadSpec | SIMPLE_MEDIA_UPLOAD |
static const client::MediaUploadSpec | RESUMABLE_MEDIA_UPLOAD |
Additional Inherited Members | |
![]() | |
void | AddJsonContentToRequest (const client::JsonCppData *content) |
Implements the update method.
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
google_drive_api::FilesResource_UpdateMethod::FilesResource_UpdateMethod | ( | const DriveService * | _service_, |
client::AuthorizationCredential * | _credential_, | ||
const absl::string_view & | file_id | ||
) |
The standard constructor takes all the required method parameters.
[in] | <em>service</em> | The service instance to send to when executed. |
[in] | <em>credential</em> | If not NULL, the credential to authorize with. In practice this is supplied by the user code that is creating the method instance. |
[in] | file_id | The ID of the file to update. |
[in] | <em>content</em> | The data object to update. |
google_drive_api::FilesResource_UpdateMethod::FilesResource_UpdateMethod | ( | const DriveService * | _service_, |
client::AuthorizationCredential * | _credential_, | ||
const absl::string_view & | file_id, | ||
const File * | _metadata_, | ||
const StringPiece & | _media_content_type_, | ||
client::DataReader * | _media_content_reader_ | ||
) |
The standard constructor takes all the required method parameters.
[in] | <em>service</em> | The service instance to send to when executed. |
[in] | <em>credential</em> | If not NULL, the credential to authorize with. In practice this is supplied by the user code that is creating the method instance. |
[in] | file_id | The ID of the file to update. |
[in] | <em>metadata</em> | The metadata object to update. If this is NULL then do not upload any metadata. |
[in] | <em>media_content_type</em> | The content type of the data in the media_content_reader. |
[in] | <em>media_content_reader</em> | The media content to update. If this is NULL then do not upload any media and ignore media_content_type. |
|
virtual |
Standard destructor.
|
virtual |
Appends the optional query parameters to the target URL.
[in,out] | target | The URL string to append to. |
Reimplemented from google_drive_api::DriveServiceBaseRequest.
|
virtual |
Appends variable value to the target string.
This is a helper function used to resolve templated variables in the URI.
[in] | variable_name | The name of the templated variable. |
[in] | config | A pass-through parameter used for lists and maps. |
[in,out] | target | The string to append the value to. |
Reimplemented from google_drive_api::DriveServiceBaseRequest.
|
inline |
Clears the 'addParents
' attribute so it is no longer set.
|
inline |
Clears the 'convert
' attribute so it is no longer set.
|
inline |
Clears the 'enforceSingleParent
' attribute so it is no longer set.
|
inline |
Clears the 'modifiedDateBehavior
' attribute so it is no longer set.
|
inline |
Clears the 'newRevision
' attribute so it is no longer set.
|
inline |
Clears the 'ocr
' attribute so it is no longer set.
|
inline |
Clears the 'ocrLanguage
' attribute so it is no longer set.
|
inline |
Clears the 'pinned
' attribute so it is no longer set.
|
inline |
Clears the 'removeParents
' attribute so it is no longer set.
|
inline |
Clears the 'setModifiedDate
' attribute so it is no longer set.
|
inline |
Clears the 'supportsAllDrives
' attribute so it is no longer set.
|
inline |
Clears the 'supportsTeamDrives
' attribute so it is no longer set.
|
inline |
Clears the 'timedTextLanguage
' attribute so it is no longer set.
|
inline |
Clears the 'timedTextTrackName
' attribute so it is no longer set.
|
inline |
Clears the 'updateViewedDate
' attribute so it is no longer set.
|
inline |
Clears the 'useContentAsIndexableText
' attribute so it is no longer set.
|
inline |
Executes the method and parses the response into a data object on success.
[out] | data | Loads from the response payload JSON data on success. |
|
inline |
Gets the optional 'addParents
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'convert
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'enforceSingleParent
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'modifiedDateBehavior
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'newRevision
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'ocr
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'ocrLanguage
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'pinned
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'removeParents
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'setModifiedDate
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'supportsAllDrives
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'supportsTeamDrives
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'timedTextLanguage
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'timedTextTrackName
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'updateViewedDate
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets the optional 'useContentAsIndexableText
' attribute.
If the value is not set then the default value will be returned.
|
inline |
Gets a modifiable pointer to the optional addParents
' attribute.
|
inline |
Gets a modifiable pointer to the optional modifiedDateBehavior
' attribute.
|
inline |
Gets a modifiable pointer to the optional ocrLanguage
' attribute.
|
inline |
Gets a modifiable pointer to the optional removeParents
' attribute.
|
inline |
Gets a modifiable pointer to the optional timedTextLanguage
' attribute.
|
inline |
Gets a modifiable pointer to the optional timedTextTrackName
' attribute.
|
inline |
Sets the 'addParents
' attribute.
[in] | value | Comma-separated list of parent IDs to add. |
|
inline |
Sets the 'convert
' attribute.
[in] | value | This parameter is deprecated and has no function. |
|
inline |
Sets the 'enforceSingleParent
' attribute.
[in] | value | Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. |
|
inline |
Sets the 'modifiedDateBehavior
' attribute.
[in] | value | Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate. |
|
inline |
Sets the 'newRevision
' attribute.
[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. |
|
inline |
Sets the 'ocr
' attribute.
[in] | value | Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. |
|
inline |
Sets the 'ocrLanguage
' attribute.
[in] | value | If ocr is true, hints at the language to use. Valid values are BCP 47 codes. |
|
inline |
Sets the 'pinned
' attribute.
[in] | value | Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. |
|
inline |
Sets the 'removeParents
' attribute.
[in] | value | Comma-separated list of parent IDs to remove. |
|
inline |
Sets the 'setModifiedDate
' attribute.
[in] | value | Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange. |
|
inline |
Sets the 'supportsAllDrives
' attribute.
[in] | value | Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives. |
|
inline |
Sets the 'supportsTeamDrives
' attribute.
[in] | value | Deprecated use supportsAllDrives instead. |
|
inline |
Sets the 'timedTextLanguage
' attribute.
[in] | value | The language of the timed text. |
|
inline |
Sets the 'timedTextTrackName
' attribute.
[in] | value | The timed text track name. |
|
inline |
Sets the 'updateViewedDate
' attribute.
[in] | value | Whether to update the view date after successfully updating the file. |
|
inline |
Sets the 'useContentAsIndexableText
' attribute.
[in] | value | Whether to use the content as indexable text. |
|
static |
Returns the specification for media upload using the resumable protocol.
|
static |
Returns MediaUploader for uploading the content. Returns the specification for media upload using the simple protocol.