Struct google_drive2::FilePatchCall [−][src]
pub struct FilePatchCall<'a, C, A> where
C: 'a,
A: 'a, { /* fields omitted */ }
Updates file metadata and/or content. This method supports patch semantics.
A builder for the patch method supported by a file resource.
It is not used directly, but through a FileMethods
instance.
Example
Instantiate a resource method builder
use drive2::File; // As the method needs a request, you would usually fill it with the desired information // into the respective structure. Some of the parts shown here might not be applicable ! // Values shown here are possibly random and not representative ! let mut req = File::default(); // You can configure optional parameters by calling the respective setters at will, and // execute the final call using `doit()`. // Values shown here are possibly random and not representative ! let result = hub.files().patch(req, "fileId") .use_content_as_indexable_text(true) .update_viewed_date(false) .timed_text_track_name("aliquyam") .timed_text_language("eos") .supports_team_drives(true) .set_modified_date(false) .remove_parents("labore") .pinned(false) .ocr_language("aliquyam") .ocr(false) .new_revision(false) .modified_date_behavior("diam") .convert(true) .add_parents("justo") .doit();
Methods
impl<'a, C, A> FilePatchCall<'a, C, A> where
C: BorrowMut<Client>,
A: GetToken,
[src]
impl<'a, C, A> FilePatchCall<'a, C, A> where
C: BorrowMut<Client>,
A: GetToken,
pub fn doit(self) -> Result<(Response, File)>
[src]
pub fn doit(self) -> Result<(Response, File)>
Perform the operation you have build so far.
pub fn request(self, new_value: File) -> FilePatchCall<'a, C, A>
[src]
pub fn request(self, new_value: File) -> FilePatchCall<'a, C, A>
Sets the request property to the given value.
Even though the property as already been set when instantiating this call, we provide this method for API completeness.
pub fn file_id(self, new_value: &str) -> FilePatchCall<'a, C, A>
[src]
pub fn file_id(self, new_value: &str) -> FilePatchCall<'a, C, A>
The ID of the file to update.
Sets the file id path property to the given value.
Even though the property as already been set when instantiating this call, we provide this method for API completeness.
pub fn use_content_as_indexable_text(
self,
new_value: bool
) -> FilePatchCall<'a, C, A>
[src]
pub fn use_content_as_indexable_text(
self,
new_value: bool
) -> FilePatchCall<'a, C, A>
Whether to use the content as indexable text.
Sets the use content as indexable text query property to the given value.
pub fn update_viewed_date(self, new_value: bool) -> FilePatchCall<'a, C, A>
[src]
pub fn update_viewed_date(self, new_value: bool) -> FilePatchCall<'a, C, A>
Whether to update the view date after successfully updating the file.
Sets the update viewed date query property to the given value.
pub fn timed_text_track_name(self, new_value: &str) -> FilePatchCall<'a, C, A>
[src]
pub fn timed_text_track_name(self, new_value: &str) -> FilePatchCall<'a, C, A>
The timed text track name.
Sets the timed text track name query property to the given value.
pub fn timed_text_language(self, new_value: &str) -> FilePatchCall<'a, C, A>
[src]
pub fn timed_text_language(self, new_value: &str) -> FilePatchCall<'a, C, A>
The language of the timed text.
Sets the timed text language query property to the given value.
pub fn supports_team_drives(self, new_value: bool) -> FilePatchCall<'a, C, A>
[src]
pub fn supports_team_drives(self, new_value: bool) -> FilePatchCall<'a, C, A>
Whether the requesting application supports Team Drives.
Sets the supports team drives query property to the given value.
pub fn set_modified_date(self, new_value: bool) -> FilePatchCall<'a, C, A>
[src]
pub fn set_modified_date(self, new_value: bool) -> FilePatchCall<'a, C, A>
Whether to set the modified date with the supplied modified date.
Sets the set modified date query property to the given value.
pub fn remove_parents(self, new_value: &str) -> FilePatchCall<'a, C, A>
[src]
pub fn remove_parents(self, new_value: &str) -> FilePatchCall<'a, C, A>
Comma-separated list of parent IDs to remove.
Sets the remove parents query property to the given value.
pub fn pinned(self, new_value: bool) -> FilePatchCall<'a, C, A>
[src]
pub fn pinned(self, new_value: bool) -> FilePatchCall<'a, C, A>
Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.
Sets the pinned query property to the given value.
pub fn ocr_language(self, new_value: &str) -> FilePatchCall<'a, C, A>
[src]
pub fn ocr_language(self, new_value: &str) -> FilePatchCall<'a, C, A>
If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
Sets the ocr language query property to the given value.
pub fn ocr(self, new_value: bool) -> FilePatchCall<'a, C, A>
[src]
pub fn ocr(self, new_value: bool) -> FilePatchCall<'a, C, A>
Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Sets the ocr query property to the given value.
pub fn new_revision(self, new_value: bool) -> FilePatchCall<'a, C, A>
[src]
pub fn new_revision(self, new_value: bool) -> FilePatchCall<'a, C, A>
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.
Sets the new revision query property to the given value.
pub fn modified_date_behavior(self, new_value: &str) -> FilePatchCall<'a, C, A>
[src]
pub fn modified_date_behavior(self, new_value: &str) -> FilePatchCall<'a, C, A>
Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.
Sets the modified date behavior query property to the given value.
pub fn convert(self, new_value: bool) -> FilePatchCall<'a, C, A>
[src]
pub fn convert(self, new_value: bool) -> FilePatchCall<'a, C, A>
This parameter is deprecated and has no function.
Sets the convert query property to the given value.
pub fn add_parents(self, new_value: &str) -> FilePatchCall<'a, C, A>
[src]
pub fn add_parents(self, new_value: &str) -> FilePatchCall<'a, C, A>
Comma-separated list of parent IDs to add.
Sets the add parents query property to the given value.
pub fn delegate(self, new_value: &'a mut Delegate) -> FilePatchCall<'a, C, A>
[src]
pub fn delegate(self, new_value: &'a mut Delegate) -> FilePatchCall<'a, C, A>
The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong while executing the actual API request.
It should be used to handle progress information, and to implement a certain level of resilience.
Sets the delegate property to the given value.
pub fn param<T>(self, name: T, value: T) -> FilePatchCall<'a, C, A> where
T: AsRef<str>,
[src]
pub fn param<T>(self, name: T, value: T) -> FilePatchCall<'a, C, A> where
T: AsRef<str>,
Set any additional parameter of the query string used in the request. It should be used to set parameters which are not yet available through their own setters.
Please note that this method must not be used to set any of the known paramters which have their own setter method. If done anyway, the request will fail.
Additional Parameters
- quotaUser (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- oauth_token (query-string) - OAuth 2.0 token for the current user.
- key (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- prettyPrint (query-boolean) - Returns response with indentations and line breaks.
- userIp (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits.
- fields (query-string) - Selector specifying which fields to include in a partial response.
- alt (query-string) - Data format for the response.
pub fn add_scope<T, S>(self, scope: T) -> FilePatchCall<'a, C, A> where
T: Into<Option<S>>,
S: AsRef<str>,
[src]
pub fn add_scope<T, S>(self, scope: T) -> FilePatchCall<'a, C, A> where
T: Into<Option<S>>,
S: AsRef<str>,
Identifies the authorization scope for the method you are building.
Use this method to actively specify which scope should be used, instead the default Scope
variant
Scope::Full
.
The scope
will be added to a set of scopes. This is important as one can maintain access
tokens for more than one scope.
If None
is specified, then all scopes will be removed and no default scope will be used either.
In that case, you have to specify your API-key using the key
parameter (see the param()
function for details).
Usually there is more than one suitable scope to authorize an operation, some of which may encompass more rights than others. For example, for listing resources, a read-only scope will be sufficient, a read-write scope will do as well.
Trait Implementations
impl<'a, C, A> CallBuilder for FilePatchCall<'a, C, A>
[src]
impl<'a, C, A> CallBuilder for FilePatchCall<'a, C, A>
Auto Trait Implementations
impl<'a, C, A> !Send for FilePatchCall<'a, C, A>
impl<'a, C, A> !Send for FilePatchCall<'a, C, A>
impl<'a, C, A> !Sync for FilePatchCall<'a, C, A>
impl<'a, C, A> !Sync for FilePatchCall<'a, C, A>