#include <drive_service.h>
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.file
◆ PermissionsResource_UpdateMethod()
google_drive_api::PermissionsResource_UpdateMethod::PermissionsResource_UpdateMethod |
( |
const DriveService * |
_service_, |
|
|
client::AuthorizationCredential * |
_credential_, |
|
|
const absl::string_view & |
file_id, |
|
|
const absl::string_view & |
permission_id, |
|
|
const Permission & |
_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 for the file or shared drive. |
[in] | permission_id | The ID for the permission. |
[in] | <em>content</em> | The data object to update. |
◆ ~PermissionsResource_UpdateMethod()
google_drive_api::PermissionsResource_UpdateMethod::~PermissionsResource_UpdateMethod |
( |
| ) |
|
|
virtual |
◆ AppendOptionalQueryParameters()
util::Status google_drive_api::PermissionsResource_UpdateMethod::AppendOptionalQueryParameters |
( |
string * |
target | ) |
|
|
virtual |
◆ AppendVariable()
util::Status google_drive_api::PermissionsResource_UpdateMethod::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_remove_expiration()
void google_drive_api::PermissionsResource_UpdateMethod::clear_remove_expiration |
( |
| ) |
|
|
inline |
Clears the 'removeExpiration
' attribute so it is no longer set.
◆ clear_supports_all_drives()
void google_drive_api::PermissionsResource_UpdateMethod::clear_supports_all_drives |
( |
| ) |
|
|
inline |
Clears the 'supportsAllDrives
' attribute so it is no longer set.
◆ clear_supports_team_drives()
void google_drive_api::PermissionsResource_UpdateMethod::clear_supports_team_drives |
( |
| ) |
|
|
inline |
Clears the 'supportsTeamDrives
' attribute so it is no longer set.
◆ clear_transfer_ownership()
void google_drive_api::PermissionsResource_UpdateMethod::clear_transfer_ownership |
( |
| ) |
|
|
inline |
Clears the 'transferOwnership
' attribute so it is no longer set.
◆ clear_use_domain_admin_access()
void google_drive_api::PermissionsResource_UpdateMethod::clear_use_domain_admin_access |
( |
| ) |
|
|
inline |
Clears the 'useDomainAdminAccess
' attribute so it is no longer set.
◆ ExecuteAndParseResponse()
util::Status google_drive_api::PermissionsResource_UpdateMethod::ExecuteAndParseResponse |
( |
Permission * |
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_remove_expiration()
bool google_drive_api::PermissionsResource_UpdateMethod::get_remove_expiration |
( |
| ) |
const |
|
inline |
Gets the optional 'removeExpiration
' attribute.
If the value is not set then the default value will be returned.
◆ get_supports_all_drives()
bool google_drive_api::PermissionsResource_UpdateMethod::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::PermissionsResource_UpdateMethod::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_transfer_ownership()
bool google_drive_api::PermissionsResource_UpdateMethod::get_transfer_ownership |
( |
| ) |
const |
|
inline |
Gets the optional 'transferOwnership
' attribute.
If the value is not set then the default value will be returned.
◆ get_use_domain_admin_access()
bool google_drive_api::PermissionsResource_UpdateMethod::get_use_domain_admin_access |
( |
| ) |
const |
|
inline |
Gets the optional 'useDomainAdminAccess
' attribute.
If the value is not set then the default value will be returned.
◆ set_remove_expiration()
void google_drive_api::PermissionsResource_UpdateMethod::set_remove_expiration |
( |
bool |
value | ) |
|
|
inline |
Sets the 'removeExpiration
' attribute.
- Parameters
-
[in] | value | Whether to remove the expiration date. |
◆ set_supports_all_drives()
void google_drive_api::PermissionsResource_UpdateMethod::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::PermissionsResource_UpdateMethod::set_supports_team_drives |
( |
bool |
value | ) |
|
|
inline |
Sets the 'supportsTeamDrives
' attribute.
- Deprecated:
- Parameters
-
[in] | value | Deprecated use supportsAllDrives instead. |
◆ set_transfer_ownership()
void google_drive_api::PermissionsResource_UpdateMethod::set_transfer_ownership |
( |
bool |
value | ) |
|
|
inline |
Sets the 'transferOwnership
' attribute.
- Parameters
-
[in] | value | Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'. |
◆ set_use_domain_admin_access()
void google_drive_api::PermissionsResource_UpdateMethod::set_use_domain_admin_access |
( |
bool |
value | ) |
|
|
inline |
Sets the 'useDomainAdminAccess
' attribute.
- Parameters
-
[in] | value | Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. |
The documentation for this class was generated from the following files: