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>

source

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.
source

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.
source

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.
source

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.
source

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.
source

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.
source

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.
source

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.
source

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.
source

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.

Trait Implementations§

source§

impl<'a, S> MethodsBuilder for ProjectMethods<'a, S>

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for ProjectMethods<'a, S>

§

impl<'a, S> Send for ProjectMethods<'a, S>
where S: Sync,

§

impl<'a, S> Sync for ProjectMethods<'a, S>
where S: Sync,

§

impl<'a, S> Unpin for ProjectMethods<'a, S>

§

impl<'a, S> !UnwindSafe for ProjectMethods<'a, S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more