#include <drive_service.h>
Implements the patch 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
◆ FilesResource_PatchMethod()
google_drive_api::FilesResource_PatchMethod::FilesResource_PatchMethod |
( |
const DriveService * |
_service_, |
|
|
client::AuthorizationCredential * |
_credential_, |
|
|
const absl::string_view & |
file_id, |
|
|
const File & |
_content_ |
|
) |
| |
The standard constructor takes all the required method parameters.
- 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 patch. |
◆ ~FilesResource_PatchMethod()
google_drive_api::FilesResource_PatchMethod::~FilesResource_PatchMethod |
( |
| ) |
|
|
virtual |
◆ AppendOptionalQueryParameters()
util::Status google_drive_api::FilesResource_PatchMethod::AppendOptionalQueryParameters |
( |
string * |
target | ) |
|
|
virtual |
◆ AppendVariable()
util::Status google_drive_api::FilesResource_PatchMethod::AppendVariable |
( |
const StringPiece & |
variable_name, |
|
|
const client::UriTemplateConfig & |
config, |
|
|
string * |
target |
|
) |
| |
|
virtual |
Appends variable value to the target string.
This is a helper function used to resolve templated variables in the URI.
- Parameters
-
[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.
◆ clear_add_parents()
void google_drive_api::FilesResource_PatchMethod::clear_add_parents |
( |
| ) |
|
|
inline |
Clears the 'addParents
' attribute so it is no longer set.
◆ clear_convert()
void google_drive_api::FilesResource_PatchMethod::clear_convert |
( |
| ) |
|
|
inline |
Clears the 'convert
' attribute so it is no longer set.
◆ clear_enforce_single_parent()
void google_drive_api::FilesResource_PatchMethod::clear_enforce_single_parent |
( |
| ) |
|
|
inline |
Clears the 'enforceSingleParent
' attribute so it is no longer set.
◆ clear_modified_date_behavior()
void google_drive_api::FilesResource_PatchMethod::clear_modified_date_behavior |
( |
| ) |
|
|
inline |
Clears the 'modifiedDateBehavior
' attribute so it is no longer set.
◆ clear_new_revision()
void google_drive_api::FilesResource_PatchMethod::clear_new_revision |
( |
| ) |
|
|
inline |
Clears the 'newRevision
' attribute so it is no longer set.
◆ clear_ocr()
void google_drive_api::FilesResource_PatchMethod::clear_ocr |
( |
| ) |
|
|
inline |
Clears the 'ocr
' attribute so it is no longer set.
◆ clear_ocr_language()
void google_drive_api::FilesResource_PatchMethod::clear_ocr_language |
( |
| ) |
|
|
inline |
Clears the 'ocrLanguage
' attribute so it is no longer set.
◆ clear_pinned()
void google_drive_api::FilesResource_PatchMethod::clear_pinned |
( |
| ) |
|
|
inline |
Clears the 'pinned
' attribute so it is no longer set.
◆ clear_remove_parents()
void google_drive_api::FilesResource_PatchMethod::clear_remove_parents |
( |
| ) |
|
|
inline |
Clears the 'removeParents
' attribute so it is no longer set.
◆ clear_set_modified_date()
void google_drive_api::FilesResource_PatchMethod::clear_set_modified_date |
( |
| ) |
|
|
inline |
Clears the 'setModifiedDate
' attribute so it is no longer set.
◆ clear_supports_all_drives()
void google_drive_api::FilesResource_PatchMethod::clear_supports_all_drives |
( |
| ) |
|
|
inline |
Clears the 'supportsAllDrives
' attribute so it is no longer set.
◆ clear_supports_team_drives()
void google_drive_api::FilesResource_PatchMethod::clear_supports_team_drives |
( |
| ) |
|
|
inline |
Clears the 'supportsTeamDrives
' attribute so it is no longer set.
◆ clear_timed_text_language()
void google_drive_api::FilesResource_PatchMethod::clear_timed_text_language |
( |
| ) |
|
|
inline |
Clears the 'timedTextLanguage
' attribute so it is no longer set.
◆ clear_timed_text_track_name()
void google_drive_api::FilesResource_PatchMethod::clear_timed_text_track_name |
( |
| ) |
|
|
inline |
Clears the 'timedTextTrackName
' attribute so it is no longer set.
◆ clear_update_viewed_date()
void google_drive_api::FilesResource_PatchMethod::clear_update_viewed_date |
( |
| ) |
|
|
inline |
Clears the 'updateViewedDate
' attribute so it is no longer set.
◆ clear_use_content_as_indexable_text()
void google_drive_api::FilesResource_PatchMethod::clear_use_content_as_indexable_text |
( |
| ) |
|
|
inline |
Clears the 'useContentAsIndexableText
' attribute so it is no longer set.
◆ ExecuteAndParseResponse()
util::Status google_drive_api::FilesResource_PatchMethod::ExecuteAndParseResponse |
( |
File * |
data | ) |
|
|
inline |
Executes the method and parses the response into a data object on success.
- Parameters
-
[out] | data | Loads from the response payload JSON data on success. |
- Returns
- 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.
◆ get_add_parents()
const string& google_drive_api::FilesResource_PatchMethod::get_add_parents |
( |
| ) |
const |
|
inline |
Gets the optional 'addParents
' attribute.
If the value is not set then the default value will be returned.
◆ get_convert()
bool google_drive_api::FilesResource_PatchMethod::get_convert |
( |
| ) |
const |
|
inline |
Gets the optional 'convert
' attribute.
If the value is not set then the default value will be returned.
◆ get_enforce_single_parent()
bool google_drive_api::FilesResource_PatchMethod::get_enforce_single_parent |
( |
| ) |
const |
|
inline |
Gets the optional 'enforceSingleParent
' attribute.
If the value is not set then the default value will be returned.
◆ get_modified_date_behavior()
const string& google_drive_api::FilesResource_PatchMethod::get_modified_date_behavior |
( |
| ) |
const |
|
inline |
Gets the optional 'modifiedDateBehavior
' attribute.
If the value is not set then the default value will be returned.
◆ get_new_revision()
bool google_drive_api::FilesResource_PatchMethod::get_new_revision |
( |
| ) |
const |
|
inline |
Gets the optional 'newRevision
' attribute.
If the value is not set then the default value will be returned.
◆ get_ocr()
bool google_drive_api::FilesResource_PatchMethod::get_ocr |
( |
| ) |
const |
|
inline |
Gets the optional 'ocr
' attribute.
If the value is not set then the default value will be returned.
◆ get_ocr_language()
const string& google_drive_api::FilesResource_PatchMethod::get_ocr_language |
( |
| ) |
const |
|
inline |
Gets the optional 'ocrLanguage
' attribute.
If the value is not set then the default value will be returned.
◆ get_pinned()
bool google_drive_api::FilesResource_PatchMethod::get_pinned |
( |
| ) |
const |
|
inline |
Gets the optional 'pinned
' attribute.
If the value is not set then the default value will be returned.
◆ get_remove_parents()
const string& google_drive_api::FilesResource_PatchMethod::get_remove_parents |
( |
| ) |
const |
|
inline |
Gets the optional 'removeParents
' attribute.
If the value is not set then the default value will be returned.
◆ get_set_modified_date()
bool google_drive_api::FilesResource_PatchMethod::get_set_modified_date |
( |
| ) |
const |
|
inline |
Gets the optional 'setModifiedDate
' attribute.
If the value is not set then the default value will be returned.
◆ get_supports_all_drives()
bool google_drive_api::FilesResource_PatchMethod::get_supports_all_drives |
( |
| ) |
const |
|
inline |
Gets the optional 'supportsAllDrives
' attribute.
If the value is not set then the default value will be returned.
◆ get_supports_team_drives()
bool google_drive_api::FilesResource_PatchMethod::get_supports_team_drives |
( |
| ) |
const |
|
inline |
Gets the optional 'supportsTeamDrives
' attribute.
If the value is not set then the default value will be returned.
◆ get_timed_text_language()
const string& google_drive_api::FilesResource_PatchMethod::get_timed_text_language |
( |
| ) |
const |
|
inline |
Gets the optional 'timedTextLanguage
' attribute.
If the value is not set then the default value will be returned.
◆ get_timed_text_track_name()
const string& google_drive_api::FilesResource_PatchMethod::get_timed_text_track_name |
( |
| ) |
const |
|
inline |
Gets the optional 'timedTextTrackName
' attribute.
If the value is not set then the default value will be returned.
◆ get_update_viewed_date()
bool google_drive_api::FilesResource_PatchMethod::get_update_viewed_date |
( |
| ) |
const |
|
inline |
Gets the optional 'updateViewedDate
' attribute.
If the value is not set then the default value will be returned.
◆ get_use_content_as_indexable_text()
bool google_drive_api::FilesResource_PatchMethod::get_use_content_as_indexable_text |
( |
| ) |
const |
|
inline |
Gets the optional 'useContentAsIndexableText
' attribute.
If the value is not set then the default value will be returned.
◆ mutable_addParents()
string* google_drive_api::FilesResource_PatchMethod::mutable_addParents |
( |
| ) |
|
|
inline |
Gets a modifiable pointer to the optional addParents
' attribute.
- Returns
- The value can be set by dereferencing the pointer.
◆ mutable_modifiedDateBehavior()
string* google_drive_api::FilesResource_PatchMethod::mutable_modifiedDateBehavior |
( |
| ) |
|
|
inline |
Gets a modifiable pointer to the optional modifiedDateBehavior
' attribute.
- Returns
- The value can be set by dereferencing the pointer.
◆ mutable_ocrLanguage()
string* google_drive_api::FilesResource_PatchMethod::mutable_ocrLanguage |
( |
| ) |
|
|
inline |
Gets a modifiable pointer to the optional ocrLanguage
' attribute.
- Returns
- The value can be set by dereferencing the pointer.
◆ mutable_removeParents()
string* google_drive_api::FilesResource_PatchMethod::mutable_removeParents |
( |
| ) |
|
|
inline |
Gets a modifiable pointer to the optional removeParents
' attribute.
- Returns
- The value can be set by dereferencing the pointer.
◆ mutable_timedTextLanguage()
string* google_drive_api::FilesResource_PatchMethod::mutable_timedTextLanguage |
( |
| ) |
|
|
inline |
Gets a modifiable pointer to the optional timedTextLanguage
' attribute.
- Returns
- The value can be set by dereferencing the pointer.
◆ mutable_timedTextTrackName()
string* google_drive_api::FilesResource_PatchMethod::mutable_timedTextTrackName |
( |
| ) |
|
|
inline |
Gets a modifiable pointer to the optional timedTextTrackName
' attribute.
- Returns
- The value can be set by dereferencing the pointer.
◆ set_add_parents()
void google_drive_api::FilesResource_PatchMethod::set_add_parents |
( |
const string & |
value | ) |
|
|
inline |
Sets the 'addParents
' attribute.
- Parameters
-
[in] | value | Comma-separated list of parent IDs to add. |
◆ set_convert()
void google_drive_api::FilesResource_PatchMethod::set_convert |
( |
bool |
value | ) |
|
|
inline |
Sets the 'convert
' attribute.
- Parameters
-
[in] | value | This parameter is deprecated and has no function. |
◆ set_enforce_single_parent()
void google_drive_api::FilesResource_PatchMethod::set_enforce_single_parent |
( |
bool |
value | ) |
|
|
inline |
Sets the 'enforceSingleParent
' attribute.
- Parameters
-
[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. |
◆ set_modified_date_behavior()
void google_drive_api::FilesResource_PatchMethod::set_modified_date_behavior |
( |
const string & |
value | ) |
|
|
inline |
Sets the 'modifiedDateBehavior
' attribute.
- Parameters
-
[in] | value | Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate. |
◆ set_new_revision()
void google_drive_api::FilesResource_PatchMethod::set_new_revision |
( |
bool |
value | ) |
|
|
inline |
Sets the 'newRevision
' attribute.
- Parameters
-
[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. |
◆ set_ocr()
void google_drive_api::FilesResource_PatchMethod::set_ocr |
( |
bool |
value | ) |
|
|
inline |
Sets the 'ocr
' attribute.
- Parameters
-
[in] | value | Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. |
◆ set_ocr_language()
void google_drive_api::FilesResource_PatchMethod::set_ocr_language |
( |
const string & |
value | ) |
|
|
inline |
Sets the 'ocrLanguage
' attribute.
- Parameters
-
[in] | value | If ocr is true, hints at the language to use. Valid values are BCP 47 codes. |
◆ set_pinned()
void google_drive_api::FilesResource_PatchMethod::set_pinned |
( |
bool |
value | ) |
|
|
inline |
Sets the 'pinned
' attribute.
- Parameters
-
[in] | value | Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. |
◆ set_remove_parents()
void google_drive_api::FilesResource_PatchMethod::set_remove_parents |
( |
const string & |
value | ) |
|
|
inline |
Sets the 'removeParents
' attribute.
- Parameters
-
[in] | value | Comma-separated list of parent IDs to remove. |
◆ set_set_modified_date()
void google_drive_api::FilesResource_PatchMethod::set_set_modified_date |
( |
bool |
value | ) |
|
|
inline |
Sets the 'setModifiedDate
' attribute.
- Parameters
-
[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. |
◆ set_supports_all_drives()
void google_drive_api::FilesResource_PatchMethod::set_supports_all_drives |
( |
bool |
value | ) |
|
|
inline |
Sets the 'supportsAllDrives
' attribute.
- Deprecated:
- Parameters
-
[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. |
◆ set_supports_team_drives()
void google_drive_api::FilesResource_PatchMethod::set_supports_team_drives |
( |
bool |
value | ) |
|
|
inline |
Sets the 'supportsTeamDrives
' attribute.
- Deprecated:
- Parameters
-
[in] | value | Deprecated use supportsAllDrives instead. |
◆ set_timed_text_language()
void google_drive_api::FilesResource_PatchMethod::set_timed_text_language |
( |
const string & |
value | ) |
|
|
inline |
Sets the 'timedTextLanguage
' attribute.
- Parameters
-
[in] | value | The language of the timed text. |
◆ set_timed_text_track_name()
void google_drive_api::FilesResource_PatchMethod::set_timed_text_track_name |
( |
const string & |
value | ) |
|
|
inline |
Sets the 'timedTextTrackName
' attribute.
- Parameters
-
[in] | value | The timed text track name. |
◆ set_update_viewed_date()
void google_drive_api::FilesResource_PatchMethod::set_update_viewed_date |
( |
bool |
value | ) |
|
|
inline |
Sets the 'updateViewedDate
' attribute.
- Parameters
-
[in] | value | Whether to update the view date after successfully updating the file. |
◆ set_use_content_as_indexable_text()
void google_drive_api::FilesResource_PatchMethod::set_use_content_as_indexable_text |
( |
bool |
value | ) |
|
|
inline |
Sets the 'useContentAsIndexableText
' attribute.
- Parameters
-
[in] | value | Whether to use the content as indexable text. |
The documentation for this class was generated from the following files: