Struct google_texttospeech1::api::OperationMethods
source · pub struct OperationMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on operation resources.
It is not used directly, but through the Texttospeech
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_texttospeech1 as texttospeech1;
use std::default::Default;
use texttospeech1::{Texttospeech, oauth2, hyper, hyper_rustls, chrono, FieldMask};
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = Texttospeech::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `cancel(...)` and `delete(...)`
// to build up your call.
let rb = hub.operations();
Implementations§
source§impl<'a, S> OperationMethods<'a, S>
impl<'a, S> OperationMethods<'a, S>
sourcepub fn cancel(
&self,
request: CancelOperationRequest,
name: &str
) -> OperationCancelCall<'a, S>
pub fn cancel( &self, request: CancelOperationRequest, name: &str ) -> OperationCancelCall<'a, S>
Create a builder to help you perform the following task:
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED
.
§Arguments
request
- No description provided.name
- The name of the operation resource to be cancelled.
sourcepub fn delete(&self, name: &str) -> OperationDeleteCall<'a, S>
pub fn delete(&self, name: &str) -> OperationDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
§Arguments
name
- The name of the operation resource to be deleted.