Struct google_cloudscheduler1::api::ProjectMethods
source · pub struct ProjectMethods<'a, S>where
S: '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 as cloudscheduler1;
use std::default::Default;
use cloudscheduler1::{CloudScheduler, 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 = CloudScheduler::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 `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(...)` and `locations_list(...)`
// to build up your call.
let rb = hub.projects();
Implementations§
source§impl<'a, S> ProjectMethods<'a, S>
impl<'a, S> ProjectMethods<'a, S>
sourcepub fn locations_jobs_create(
&self,
request: Job,
parent: &str
) -> ProjectLocationJobCreateCall<'a, S>
pub fn locations_jobs_create( &self, request: Job, parent: &str ) -> ProjectLocationJobCreateCall<'a, S>
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, S>
pub fn locations_jobs_delete( &self, name: &str ) -> ProjectLocationJobDeleteCall<'a, S>
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, S>
pub fn locations_jobs_get(&self, name: &str) -> ProjectLocationJobGetCall<'a, S>
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, S>
pub fn locations_jobs_list( &self, parent: &str ) -> ProjectLocationJobListCall<'a, S>
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, S>
pub fn locations_jobs_patch( &self, request: Job, name: &str ) -> ProjectLocationJobPatchCall<'a, S>
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_ID
can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects *LOCATION_ID
is the canonical ID for the job’s location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. *JOB_ID
can 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, S>
pub fn locations_jobs_pause( &self, request: PauseJobRequest, name: &str ) -> ProjectLocationJobPauseCall<'a, S>
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, S>
pub fn locations_jobs_resume( &self, request: ResumeJobRequest, name: &str ) -> ProjectLocationJobResumeCall<'a, S>
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, S>
pub fn locations_jobs_run( &self, request: RunJobRequest, name: &str ) -> ProjectLocationJobRunCall<'a, S>
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_get(&self, name: &str) -> ProjectLocationGetCall<'a, S>
pub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, S>
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, S>
pub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, S>
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.