#include <drive_service.h>
Implements the copy 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.photos.readonly
◆ FilesResource_CopyMethod()
google_drive_api::FilesResource_CopyMethod::FilesResource_CopyMethod |
( |
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 copy. |
[in] | <em>content</em> | The data object to copy. |
◆ ~FilesResource_CopyMethod()
google_drive_api::FilesResource_CopyMethod::~FilesResource_CopyMethod |
( |
| ) |
|
|
virtual |
◆ AppendOptionalQueryParameters()
util::Status google_drive_api::FilesResource_CopyMethod::AppendOptionalQueryParameters |
( |
string * |
target | ) |
|
|
virtual |
◆ AppendVariable()
util::Status google_drive_api::FilesResource_CopyMethod::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_convert()
void google_drive_api::FilesResource_CopyMethod::clear_convert |
( |
| ) |
|
|
inline |
Clears the 'convert
' attribute so it is no longer set.
◆ clear_enforce_single_parent()
void google_drive_api::FilesResource_CopyMethod::clear_enforce_single_parent |
( |
| ) |
|
|
inline |
Clears the 'enforceSingleParent
' attribute so it is no longer set.
◆ clear_ocr()
void google_drive_api::FilesResource_CopyMethod::clear_ocr |
( |
| ) |
|
|
inline |
Clears the 'ocr
' attribute so it is no longer set.
◆ clear_ocr_language()
void google_drive_api::FilesResource_CopyMethod::clear_ocr_language |
( |
| ) |
|
|
inline |
Clears the 'ocrLanguage
' attribute so it is no longer set.
◆ clear_pinned()
void google_drive_api::FilesResource_CopyMethod::clear_pinned |
( |
| ) |
|
|
inline |
Clears the 'pinned
' attribute so it is no longer set.
◆ clear_supports_all_drives()
void google_drive_api::FilesResource_CopyMethod::clear_supports_all_drives |
( |
| ) |
|
|
inline |
Clears the 'supportsAllDrives
' attribute so it is no longer set.
◆ clear_supports_team_drives()
void google_drive_api::FilesResource_CopyMethod::clear_supports_team_drives |
( |
| ) |
|
|
inline |
Clears the 'supportsTeamDrives
' attribute so it is no longer set.
◆ clear_timed_text_language()
void google_drive_api::FilesResource_CopyMethod::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_CopyMethod::clear_timed_text_track_name |
( |
| ) |
|
|
inline |
Clears the 'timedTextTrackName
' attribute so it is no longer set.
◆ clear_visibility()
void google_drive_api::FilesResource_CopyMethod::clear_visibility |
( |
| ) |
|
|
inline |
Clears the 'visibility
' attribute so it is no longer set.
◆ ExecuteAndParseResponse()
util::Status google_drive_api::FilesResource_CopyMethod::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_convert()
bool google_drive_api::FilesResource_CopyMethod::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_CopyMethod::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_ocr()
bool google_drive_api::FilesResource_CopyMethod::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_CopyMethod::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_CopyMethod::get_pinned |
( |
| ) |
const |
|
inline |
Gets the optional 'pinned
' attribute.
If the value is not set then the default value will be returned.
◆ get_supports_all_drives()
bool google_drive_api::FilesResource_CopyMethod::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_CopyMethod::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_CopyMethod::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_CopyMethod::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_visibility()
const string& google_drive_api::FilesResource_CopyMethod::get_visibility |
( |
| ) |
const |
|
inline |
Gets the optional 'visibility
' attribute.
If the value is not set then the default value will be returned.
◆ mutable_ocrLanguage()
string* google_drive_api::FilesResource_CopyMethod::mutable_ocrLanguage |
( |
| ) |
|
|
inline |
Gets a modifiable pointer to the optional ocrLanguage
' attribute.
- Returns
- The value can be set by dereferencing the pointer.
◆ mutable_timedTextLanguage()
string* google_drive_api::FilesResource_CopyMethod::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_CopyMethod::mutable_timedTextTrackName |
( |
| ) |
|
|
inline |
Gets a modifiable pointer to the optional timedTextTrackName
' attribute.
- Returns
- The value can be set by dereferencing the pointer.
◆ mutable_visibility()
string* google_drive_api::FilesResource_CopyMethod::mutable_visibility |
( |
| ) |
|
|
inline |
Gets a modifiable pointer to the optional visibility
' attribute.
- Returns
- The value can be set by dereferencing the pointer.
◆ set_convert()
void google_drive_api::FilesResource_CopyMethod::set_convert |
( |
bool |
value | ) |
|
|
inline |
Sets the 'convert
' attribute.
- Parameters
-
[in] | value | Whether to convert this file to the corresponding Google Docs format. |
◆ set_enforce_single_parent()
void google_drive_api::FilesResource_CopyMethod::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. Requests that specify more than one parent will fail. |
◆ set_ocr()
void google_drive_api::FilesResource_CopyMethod::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_CopyMethod::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_CopyMethod::set_pinned |
( |
bool |
value | ) |
|
|
inline |
Sets the 'pinned
' attribute.
- Parameters
-
[in] | value | Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions. |
◆ set_supports_all_drives()
void google_drive_api::FilesResource_CopyMethod::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_CopyMethod::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_CopyMethod::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_CopyMethod::set_timed_text_track_name |
( |
const string & |
value | ) |
|
|
inline |
Sets the 'timedTextTrackName
' attribute.
- Parameters
-
[in] | value | The timed text track name. |
◆ set_visibility()
void google_drive_api::FilesResource_CopyMethod::set_visibility |
( |
const string & |
value | ) |
|
|
inline |
Sets the 'visibility
' attribute.
- Parameters
-
[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. |
The documentation for this class was generated from the following files: