Struct google_cloudfunctions1::ProjectMethods
source · pub struct ProjectMethods<'a, C, A>where
C: 'a,
A: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on project resources.
It is not used directly, but through the CloudFunctions
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_cloudfunctions1 as cloudfunctions1;
use std::default::Default;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
use cloudfunctions1::CloudFunctions;
let secret: ApplicationSecret = Default::default();
let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
<MemoryStorage as Default>::default(), None);
let mut hub = CloudFunctions::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_functions_call(...)`, `locations_functions_create(...)`, `locations_functions_delete(...)`, `locations_functions_generate_download_url(...)`, `locations_functions_generate_upload_url(...)`, `locations_functions_get(...)`, `locations_functions_list(...)`, `locations_functions_patch(...)` and `locations_list(...)`
// to build up your call.
let rb = hub.projects();
Implementations§
source§impl<'a, C, A> ProjectMethods<'a, C, A>
impl<'a, C, A> ProjectMethods<'a, C, A>
sourcepub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C, A>
pub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C, A>
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.
sourcepub fn locations_functions_delete(
&self,
name: &str,
) -> ProjectLocationFunctionDeleteCall<'a, C, A>
pub fn locations_functions_delete( &self, name: &str, ) -> ProjectLocationFunctionDeleteCall<'a, C, A>
Create a builder to help you perform the following task:
Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.
§Arguments
name
- The name of the function which should be deleted.
sourcepub fn locations_functions_get(
&self,
name: &str,
) -> ProjectLocationFunctionGetCall<'a, C, A>
pub fn locations_functions_get( &self, name: &str, ) -> ProjectLocationFunctionGetCall<'a, C, A>
Create a builder to help you perform the following task:
Returns a function with the given name from the requested project.
§Arguments
name
- The name of the function which details should be obtained.
sourcepub fn locations_functions_create(
&self,
request: CloudFunction,
location: &str,
) -> ProjectLocationFunctionCreateCall<'a, C, A>
pub fn locations_functions_create( &self, request: CloudFunction, location: &str, ) -> ProjectLocationFunctionCreateCall<'a, C, A>
Create a builder to help you perform the following task:
Creates a new function. If a function with the given name already exists in
the specified project, the long running operation will return
ALREADY_EXISTS
error.
§Arguments
request
- No description provided.location
- The project and location in which the function should be created, specified in the formatprojects/*/locations/*
sourcepub fn locations_functions_patch(
&self,
request: CloudFunction,
name: &str,
) -> ProjectLocationFunctionPatchCall<'a, C, A>
pub fn locations_functions_patch( &self, request: CloudFunction, name: &str, ) -> ProjectLocationFunctionPatchCall<'a, C, A>
Create a builder to help you perform the following task:
Updates existing function.
§Arguments
request
- No description provided.name
- A user-defined name of the function. Function names must be unique globally and match patternprojects/*/locations/*/functions/*
sourcepub fn locations_functions_generate_upload_url(
&self,
request: GenerateUploadUrlRequest,
parent: &str,
) -> ProjectLocationFunctionGenerateUploadUrlCall<'a, C, A>
pub fn locations_functions_generate_upload_url( &self, request: GenerateUploadUrlRequest, parent: &str, ) -> ProjectLocationFunctionGenerateUploadUrlCall<'a, C, A>
Create a builder to help you perform the following task:
Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code.
§Arguments
request
- No description provided.parent
- The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects//locations/
sourcepub fn locations_functions_call(
&self,
request: CallFunctionRequest,
name: &str,
) -> ProjectLocationFunctionCallCall<'a, C, A>
pub fn locations_functions_call( &self, request: CallFunctionRequest, name: &str, ) -> ProjectLocationFunctionCallCall<'a, C, A>
Create a builder to help you perform the following task:
Invokes synchronously deployed function. To be used for testing, very limited traffic allowed.
§Arguments
request
- No description provided.name
- The name of the function to be called.
sourcepub fn locations_functions_generate_download_url(
&self,
request: GenerateDownloadUrlRequest,
name: &str,
) -> ProjectLocationFunctionGenerateDownloadUrlCall<'a, C, A>
pub fn locations_functions_generate_download_url( &self, request: GenerateDownloadUrlRequest, name: &str, ) -> ProjectLocationFunctionGenerateDownloadUrlCall<'a, C, A>
Create a builder to help you perform the following task:
Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within minutes after generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls
§Arguments
request
- No description provided.name
- The name of function for which source code Google Cloud Storage signed URL should be generated.
sourcepub fn locations_functions_list(
&self,
parent: &str,
) -> ProjectLocationFunctionListCall<'a, C, A>
pub fn locations_functions_list( &self, parent: &str, ) -> ProjectLocationFunctionListCall<'a, C, A>
Create a builder to help you perform the following task:
Returns a list of functions that belong to the requested project.
§Arguments
parent
- The project and location from which the function should be listed, specified in the formatprojects/*/locations/*
If you want to list functions in all locations, use “-” in place of a location.
Trait Implementations§
impl<'a, C, A> MethodsBuilder for ProjectMethods<'a, C, A>
Auto Trait Implementations§
impl<'a, C, A> Freeze for ProjectMethods<'a, C, A>
impl<'a, C, A> !RefUnwindSafe for ProjectMethods<'a, C, A>
impl<'a, C, A> !Send for ProjectMethods<'a, C, A>
impl<'a, C, A> !Sync for ProjectMethods<'a, C, A>
impl<'a, C, A> Unpin for ProjectMethods<'a, C, A>
impl<'a, C, A> !UnwindSafe for ProjectMethods<'a, C, A>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more