pub struct ProjectMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on project resources.
It is not used directly, but through the CloudScheduler hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_cloudscheduler1_beta1 as cloudscheduler1_beta1;
use cloudscheduler1_beta1::{CloudScheduler, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = CloudScheduler::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_get(...)`, `locations_jobs_create(...)`, `locations_jobs_delete(...)`, `locations_jobs_get(...)`, `locations_jobs_list(...)`, `locations_jobs_patch(...)`, `locations_jobs_pause(...)`, `locations_jobs_resume(...)`, `locations_jobs_run(...)`, `locations_list(...)`, `locations_operations_cancel(...)`, `locations_operations_delete(...)`, `locations_operations_get(...)` and `locations_operations_list(...)`
// to build up your call.
let rb = hub.projects();Implementations§
Source§impl<'a, C> ProjectMethods<'a, C>
impl<'a, C> ProjectMethods<'a, C>
Sourcepub fn locations_jobs_create(
&self,
request: Job,
parent: &str,
) -> ProjectLocationJobCreateCall<'a, C>
pub fn locations_jobs_create( &self, request: Job, parent: &str, ) -> ProjectLocationJobCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a job.
§Arguments
request- No description provided.parent- Required. The location name. For example:projects/PROJECT_ID/locations/LOCATION_ID.
Sourcepub fn locations_jobs_delete(
&self,
name: &str,
) -> ProjectLocationJobDeleteCall<'a, C>
pub fn locations_jobs_delete( &self, name: &str, ) -> ProjectLocationJobDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a job.
§Arguments
name- Required. The job name. For example:projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.
Sourcepub fn locations_jobs_get(&self, name: &str) -> ProjectLocationJobGetCall<'a, C>
pub fn locations_jobs_get(&self, name: &str) -> ProjectLocationJobGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a job.
§Arguments
name- Required. The job name. For example:projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.
Sourcepub fn locations_jobs_list(
&self,
parent: &str,
) -> ProjectLocationJobListCall<'a, C>
pub fn locations_jobs_list( &self, parent: &str, ) -> ProjectLocationJobListCall<'a, C>
Create a builder to help you perform the following task:
Lists jobs.
§Arguments
parent- Required. The location name. For example:projects/PROJECT_ID/locations/LOCATION_ID.
Sourcepub fn locations_jobs_patch(
&self,
request: Job,
name: &str,
) -> ProjectLocationJobPatchCall<'a, C>
pub fn locations_jobs_patch( &self, request: Job, name: &str, ) -> ProjectLocationJobPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates a job. If successful, the updated Job is returned. If the job does not exist, NOT_FOUND is returned. If UpdateJob does not successfully return, it is possible for the job to be in an Job.State.UPDATE_FAILED state. A job in this state may not be executed. If this happens, retry the UpdateJob request until a successful response is received.
§Arguments
request- No description provided.name- Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example:projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID. *PROJECT_IDcan contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects *LOCATION_IDis the canonical ID for the job’s location. The list of available locations can be obtained by calling locations.list. For more information, see Cloud Scheduler locations. *JOB_IDcan contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.
Sourcepub fn locations_jobs_pause(
&self,
request: PauseJobRequest,
name: &str,
) -> ProjectLocationJobPauseCall<'a, C>
pub fn locations_jobs_pause( &self, request: PauseJobRequest, name: &str, ) -> ProjectLocationJobPauseCall<'a, C>
Create a builder to help you perform the following task:
Pauses a job. If a job is paused then the system will stop executing the job until it is re-enabled via ResumeJob. The state of the job is stored in state; if paused it will be set to Job.State.PAUSED. A job must be in Job.State.ENABLED to be paused.
§Arguments
request- No description provided.name- Required. The job name. For example:projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.
Sourcepub fn locations_jobs_resume(
&self,
request: ResumeJobRequest,
name: &str,
) -> ProjectLocationJobResumeCall<'a, C>
pub fn locations_jobs_resume( &self, request: ResumeJobRequest, name: &str, ) -> ProjectLocationJobResumeCall<'a, C>
Create a builder to help you perform the following task:
Resume a job. This method reenables a job after it has been Job.State.PAUSED. The state of a job is stored in Job.state; after calling this method it will be set to Job.State.ENABLED. A job must be in Job.State.PAUSED to be resumed.
§Arguments
request- No description provided.name- Required. The job name. For example:projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.
Sourcepub fn locations_jobs_run(
&self,
request: RunJobRequest,
name: &str,
) -> ProjectLocationJobRunCall<'a, C>
pub fn locations_jobs_run( &self, request: RunJobRequest, name: &str, ) -> ProjectLocationJobRunCall<'a, C>
Create a builder to help you perform the following task:
Forces a job to run now. When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running.
§Arguments
request- No description provided.name- Required. The job name. For example:projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID.
Sourcepub fn locations_operations_cancel(
&self,
request: CancelOperationRequest,
name: &str,
) -> ProjectLocationOperationCancelCall<'a, C>
pub fn locations_operations_cancel( &self, request: CancelOperationRequest, name: &str, ) -> ProjectLocationOperationCancelCall<'a, C>
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 locations_operations_delete(
&self,
name: &str,
) -> ProjectLocationOperationDeleteCall<'a, C>
pub fn locations_operations_delete( &self, name: &str, ) -> ProjectLocationOperationDeleteCall<'a, C>
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.
Sourcepub fn locations_operations_get(
&self,
name: &str,
) -> ProjectLocationOperationGetCall<'a, C>
pub fn locations_operations_get( &self, name: &str, ) -> ProjectLocationOperationGetCall<'a, C>
Create a builder to help you perform the following task:
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
§Arguments
name- The name of the operation resource.
Sourcepub fn locations_operations_list(
&self,
name: &str,
) -> ProjectLocationOperationListCall<'a, C>
pub fn locations_operations_list( &self, name: &str, ) -> ProjectLocationOperationListCall<'a, C>
Create a builder to help you perform the following task:
Lists operations that match the specified filter in the request. If the server doesn’t support this method, it returns UNIMPLEMENTED.
§Arguments
name- The name of the operation’s parent resource.
Sourcepub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C>
pub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C>
Create a builder to help you perform the following task:
Gets information about a location.
§Arguments
name- Resource name for the location.
Sourcepub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>
pub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>
Create a builder to help you perform the following task:
Lists information about the supported locations for this service.
§Arguments
name- The resource that owns the locations collection, if applicable.