drive  v2
Public Member Functions | Static Public Attributes | List of all members
google_drive_api::FilesResource_InsertMethod Class Reference

#include <drive_service.h>

Inheritance diagram for google_drive_api::FilesResource_InsertMethod:
google_drive_api::DriveServiceBaseRequest

Public Member Functions

 FilesResource_InsertMethod (const DriveService *_service_, client::AuthorizationCredential *_credential_)
 
 FilesResource_InsertMethod (const DriveService *_service_, client::AuthorizationCredential *_credential_, const File *_metadata_, const StringPiece &_media_content_type_, client::DataReader *_media_content_reader_)
 
virtual ~FilesResource_InsertMethod ()
 
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_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_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_use_content_as_indexable_text ()
 
bool get_use_content_as_indexable_text () const
 
void set_use_content_as_indexable_text (bool value)
 
void clear_visibility ()
 
const string & get_visibility () const
 
string * mutable_visibility ()
 
void set_visibility (const string &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)
 
- Public Member Functions inherited from google_drive_api::DriveServiceBaseRequest
 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

- Protected Member Functions inherited from google_drive_api::DriveServiceBaseRequest
void AddJsonContentToRequest (const client::JsonCppData *content)
 

Detailed Description

Implements the insert 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

Constructor & Destructor Documentation

◆ FilesResource_InsertMethod() [1/2]

google_drive_api::FilesResource_InsertMethod::FilesResource_InsertMethod ( const DriveService _service_,
client::AuthorizationCredential *  _credential_ 
)

The standard constructor takes all the required method parameters.

Deprecated:
in favor constructor that includes the media upload 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]<em>content</em>The data object to insert.

◆ FilesResource_InsertMethod() [2/2]

google_drive_api::FilesResource_InsertMethod::FilesResource_InsertMethod ( const DriveService _service_,
client::AuthorizationCredential *  _credential_,
const File _metadata_,
const StringPiece &  _media_content_type_,
client::DataReader *  _media_content_reader_ 
)

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]<em>metadata</em>The metadata object to insert. 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 insert. If this is NULL then do not upload any media and ignore media_content_type.

◆ ~FilesResource_InsertMethod()

google_drive_api::FilesResource_InsertMethod::~FilesResource_InsertMethod ( )
virtual

Standard destructor.

Member Function Documentation

◆ AppendOptionalQueryParameters()

util::Status google_drive_api::FilesResource_InsertMethod::AppendOptionalQueryParameters ( string *  target)
virtual

Appends the optional query parameters to the target URL.

Parameters
[in,out]targetThe URL string to append to.

Reimplemented from google_drive_api::DriveServiceBaseRequest.

◆ AppendVariable()

util::Status google_drive_api::FilesResource_InsertMethod::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_nameThe name of the templated variable.
[in]configA pass-through parameter used for lists and maps.
[in,out]targetThe string to append the value to.

Reimplemented from google_drive_api::DriveServiceBaseRequest.

◆ clear_convert()

void google_drive_api::FilesResource_InsertMethod::clear_convert ( )
inline

Clears the 'convert' attribute so it is no longer set.

◆ clear_enforce_single_parent()

void google_drive_api::FilesResource_InsertMethod::clear_enforce_single_parent ( )
inline

Clears the 'enforceSingleParent' attribute so it is no longer set.

◆ clear_ocr()

void google_drive_api::FilesResource_InsertMethod::clear_ocr ( )
inline

Clears the 'ocr' attribute so it is no longer set.

◆ clear_ocr_language()

void google_drive_api::FilesResource_InsertMethod::clear_ocr_language ( )
inline

Clears the 'ocrLanguage' attribute so it is no longer set.

◆ clear_pinned()

void google_drive_api::FilesResource_InsertMethod::clear_pinned ( )
inline

Clears the 'pinned' attribute so it is no longer set.

◆ clear_supports_all_drives()

void google_drive_api::FilesResource_InsertMethod::clear_supports_all_drives ( )
inline

Clears the 'supportsAllDrives' attribute so it is no longer set.

◆ clear_supports_team_drives()

void google_drive_api::FilesResource_InsertMethod::clear_supports_team_drives ( )
inline

Clears the 'supportsTeamDrives' attribute so it is no longer set.

◆ clear_timed_text_language()

void google_drive_api::FilesResource_InsertMethod::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_InsertMethod::clear_timed_text_track_name ( )
inline

Clears the 'timedTextTrackName' attribute so it is no longer set.

◆ clear_use_content_as_indexable_text()

void google_drive_api::FilesResource_InsertMethod::clear_use_content_as_indexable_text ( )
inline

Clears the 'useContentAsIndexableText' attribute so it is no longer set.

◆ clear_visibility()

void google_drive_api::FilesResource_InsertMethod::clear_visibility ( )
inline

Clears the 'visibility' attribute so it is no longer set.

◆ ExecuteAndParseResponse()

util::Status google_drive_api::FilesResource_InsertMethod::ExecuteAndParseResponse ( File data)
inline

Executes the method and parses the response into a data object on success.

Parameters
[out]dataLoads 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_InsertMethod::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_InsertMethod::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_InsertMethod::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_InsertMethod::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_InsertMethod::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_InsertMethod::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_InsertMethod::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_InsertMethod::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_InsertMethod::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_use_content_as_indexable_text()

bool google_drive_api::FilesResource_InsertMethod::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.

◆ get_visibility()

const string& google_drive_api::FilesResource_InsertMethod::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_InsertMethod::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_InsertMethod::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_InsertMethod::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_InsertMethod::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_InsertMethod::set_convert ( bool  value)
inline

Sets the 'convert' attribute.

Parameters
[in]valueWhether to convert this file to the corresponding Google Docs format.

◆ set_enforce_single_parent()

void google_drive_api::FilesResource_InsertMethod::set_enforce_single_parent ( bool  value)
inline

Sets the 'enforceSingleParent' attribute.

Parameters
[in]valueSet 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_InsertMethod::set_ocr ( bool  value)
inline

Sets the 'ocr' attribute.

Parameters
[in]valueWhether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.

◆ set_ocr_language()

void google_drive_api::FilesResource_InsertMethod::set_ocr_language ( const string &  value)
inline

Sets the 'ocrLanguage' attribute.

Parameters
[in]valueIf ocr is true, hints at the language to use. Valid values are BCP 47 codes.

◆ set_pinned()

void google_drive_api::FilesResource_InsertMethod::set_pinned ( bool  value)
inline

Sets the 'pinned' attribute.

Parameters
[in]valueWhether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.

◆ set_supports_all_drives()

void google_drive_api::FilesResource_InsertMethod::set_supports_all_drives ( bool  value)
inline

Sets the 'supportsAllDrives' attribute.

Deprecated:
Parameters
[in]valueDeprecated - 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_InsertMethod::set_supports_team_drives ( bool  value)
inline

Sets the 'supportsTeamDrives' attribute.

Deprecated:
Parameters
[in]valueDeprecated use supportsAllDrives instead.

◆ set_timed_text_language()

void google_drive_api::FilesResource_InsertMethod::set_timed_text_language ( const string &  value)
inline

Sets the 'timedTextLanguage' attribute.

Parameters
[in]valueThe language of the timed text.

◆ set_timed_text_track_name()

void google_drive_api::FilesResource_InsertMethod::set_timed_text_track_name ( const string &  value)
inline

Sets the 'timedTextTrackName' attribute.

Parameters
[in]valueThe timed text track name.

◆ set_use_content_as_indexable_text()

void google_drive_api::FilesResource_InsertMethod::set_use_content_as_indexable_text ( bool  value)
inline

Sets the 'useContentAsIndexableText' attribute.

Parameters
[in]valueWhether to use the content as indexable text.

◆ set_visibility()

void google_drive_api::FilesResource_InsertMethod::set_visibility ( const string &  value)
inline

Sets the 'visibility' attribute.

Parameters
[in]valueThe visibility of the new file. This parameter is only relevant when convert=false.

Member Data Documentation

◆ RESUMABLE_MEDIA_UPLOAD

const client::MediaUploadSpec google_drive_api::FilesResource_InsertMethod::RESUMABLE_MEDIA_UPLOAD
static

Returns the specification for media upload using the resumable protocol.

◆ SIMPLE_MEDIA_UPLOAD

const client::MediaUploadSpec google_drive_api::FilesResource_InsertMethod::SIMPLE_MEDIA_UPLOAD
static

Returns MediaUploader for uploading the content. Returns the specification for media upload using the simple protocol.


The documentation for this class was generated from the following files: