Struct google_ml1::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 CloudMachineLearningEngine hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_ml1 as ml1;
 
use std::default::Default;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
use ml1::CloudMachineLearningEngine;
 
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 = CloudMachineLearningEngine::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 `get_config(...)`, `jobs_cancel(...)`, `jobs_create(...)`, `jobs_get(...)`, `jobs_get_iam_policy(...)`, `jobs_list(...)`, `jobs_patch(...)`, `jobs_set_iam_policy(...)`, `jobs_test_iam_permissions(...)`, `locations_get(...)`, `locations_list(...)`, `models_create(...)`, `models_delete(...)`, `models_get(...)`, `models_get_iam_policy(...)`, `models_list(...)`, `models_patch(...)`, `models_set_iam_policy(...)`, `models_test_iam_permissions(...)`, `models_versions_create(...)`, `models_versions_delete(...)`, `models_versions_get(...)`, `models_versions_list(...)`, `models_versions_patch(...)`, `models_versions_set_default(...)`, `operations_cancel(...)`, `operations_delete(...)`, `operations_get(...)`, `operations_list(...)` and `predict(...)`
// to build up your call.
let rb = hub.projects();

Implementations§

source§

impl<'a, C, A> ProjectMethods<'a, C, A>

source

pub fn operations_delete( &self, name: &str, ) -> ProjectOperationDeleteCall<'a, C, A>

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

pub fn jobs_set_iam_policy( &self, request: GoogleIamV1__SetIamPolicyRequest, resource: &str, ) -> ProjectJobSetIamPolicyCall<'a, C, A>

Create a builder to help you perform the following task:

Sets the access control policy on the specified resource. Replaces any existing policy.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
source

pub fn predict( &self, request: GoogleCloudMlV1__PredictRequest, name: &str, ) -> ProjectPredictCall<'a, C, A>

Create a builder to help you perform the following task:

Performs prediction on the data in the request. Cloud ML Engine implements a custom predict verb on top of an HTTP POST method.

For details of the request and response format, see the guide to the predict request format.

§Arguments
  • request - No description provided.
  • name - Required. The resource name of a model or a version. Authorization: requires the predict permission on the specified resource.
source

pub fn models_versions_delete( &self, name: &str, ) -> ProjectModelVersionDeleteCall<'a, C, A>

Create a builder to help you perform the following task:

Deletes a model version.

Each model can have multiple versions deployed and in use at any given time. Use this method to remove a single version.

Note: You cannot delete the version that is set as the default version of the model unless it is the only remaining version.

§Arguments
source

pub fn jobs_create( &self, request: GoogleCloudMlV1__Job, parent: &str, ) -> ProjectJobCreateCall<'a, C, A>

Create a builder to help you perform the following task:

Creates a training or a batch prediction job.

§Arguments
  • request - No description provided.
  • parent - Required. The project name.
source

pub fn jobs_test_iam_permissions( &self, request: GoogleIamV1__TestIamPermissionsRequest, resource: &str, ) -> ProjectJobTestIamPermissionCall<'a, C, A>

Create a builder to help you perform the following task:

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
source

pub fn models_versions_set_default( &self, request: GoogleCloudMlV1__SetDefaultVersionRequest, name: &str, ) -> ProjectModelVersionSetDefaultCall<'a, C, A>

Create a builder to help you perform the following task:

Designates a version to be the default for the model.

The default version is used for prediction requests made against the model that don’t specify a version.

The first version to be created for a model is automatically set as the default. You must make any subsequent changes to the default version setting manually using this method.

§Arguments
  • request - No description provided.
  • name - Required. The name of the version to make the default for the model. You can get the names of all the versions of a model by calling projects.models.versions.list.
source

pub fn models_patch( &self, request: GoogleCloudMlV1__Model, name: &str, ) -> ProjectModelPatchCall<'a, C, A>

Create a builder to help you perform the following task:

Updates a specific model resource.

Currently the only supported fields to update are description and default_version.name.

§Arguments
  • request - No description provided.
  • name - Required. The project name.
source

pub fn models_set_iam_policy( &self, request: GoogleIamV1__SetIamPolicyRequest, resource: &str, ) -> ProjectModelSetIamPolicyCall<'a, C, A>

Create a builder to help you perform the following task:

Sets the access control policy on the specified resource. Replaces any existing policy.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
source

pub fn jobs_get_iam_policy( &self, resource: &str, ) -> ProjectJobGetIamPolicyCall<'a, C, A>

Create a builder to help you perform the following task:

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

§Arguments
  • resource - REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
source

pub fn locations_list(&self, parent: &str) -> ProjectLocationListCall<'a, C, A>

Create a builder to help you perform the following task:

List all locations that provides at least one type of CMLE capability.

§Arguments
  • parent - Required. The name of the project for which available locations are to be listed (since some locations might be whitelisted for specific projects).
source

pub fn jobs_get(&self, name: &str) -> ProjectJobGetCall<'a, C, A>

Create a builder to help you perform the following task:

Describes a job.

§Arguments
  • name - Required. The name of the job to get the description of.
source

pub fn jobs_cancel( &self, request: GoogleCloudMlV1__CancelJobRequest, name: &str, ) -> ProjectJobCancelCall<'a, C, A>

Create a builder to help you perform the following task:

Cancels a running job.

§Arguments
  • request - No description provided.
  • name - Required. The name of the job to cancel.
source

pub fn models_versions_patch( &self, request: GoogleCloudMlV1__Version, name: &str, ) -> ProjectModelVersionPatchCall<'a, C, A>

Create a builder to help you perform the following task:

Updates the specified Version resource.

Currently the only update-able fields are description and autoScaling.minNodes.

§Arguments
  • request - No description provided.
  • name - Required. The name of the model.
source

pub fn models_versions_get( &self, name: &str, ) -> ProjectModelVersionGetCall<'a, C, A>

Create a builder to help you perform the following task:

Gets information about a model version.

Models can have multiple versions. You can call projects.models.versions.list to get the same information that this method returns for all of the versions of a model.

§Arguments
  • name - Required. The name of the version.
source

pub fn jobs_patch( &self, request: GoogleCloudMlV1__Job, name: &str, ) -> ProjectJobPatchCall<'a, C, A>

Create a builder to help you perform the following task:

Updates a specific job resource.

Currently the only supported fields to update are labels.

§Arguments
  • request - No description provided.
  • name - Required. The job name.
source

pub fn get_config(&self, name: &str) -> ProjectGetConfigCall<'a, C, A>

Create a builder to help you perform the following task:

Get the service account information associated with your project. You need this information in order to grant the service account permissions for the Google Cloud Storage location where you put your model training code for training the model with Google Cloud Machine Learning.

§Arguments
  • name - Required. The project name.
source

pub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C, A>

Create a builder to help you perform the following task:

Get the complete list of CMLE capabilities in a location, along with their location-specific properties.

§Arguments
  • name - Required. The name of the location.
source

pub fn models_test_iam_permissions( &self, request: GoogleIamV1__TestIamPermissionsRequest, resource: &str, ) -> ProjectModelTestIamPermissionCall<'a, C, A>

Create a builder to help you perform the following task:

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
source

pub fn operations_list(&self, name: &str) -> ProjectOperationListCall<'a, C, A>

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.

NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.

§Arguments
  • name - The name of the operation’s parent resource.
source

pub fn models_versions_create( &self, request: GoogleCloudMlV1__Version, parent: &str, ) -> ProjectModelVersionCreateCall<'a, C, A>

Create a builder to help you perform the following task:

Creates a new version of a model from a trained TensorFlow model.

If the version created in the cloud by this call is the first deployed version of the specified model, it will be made the default version of the model. When you add a version to a model that already has one or more versions, the default version does not automatically change. If you want a new version to be the default, you must call projects.models.versions.setDefault.

§Arguments
  • request - No description provided.
  • parent - Required. The name of the model.
source

pub fn models_get_iam_policy( &self, resource: &str, ) -> ProjectModelGetIamPolicyCall<'a, C, A>

Create a builder to help you perform the following task:

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

§Arguments
  • resource - REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
source

pub fn models_versions_list( &self, parent: &str, ) -> ProjectModelVersionListCall<'a, C, A>

Create a builder to help you perform the following task:

Gets basic information about all the versions of a model.

If you expect that a model has many versions, or if you need to handle only a limited number of results at a time, you can request that the list be retrieved in batches (called pages).

If there are no versions that match the request parameters, the list request returns an empty response body: {}.

§Arguments
  • parent - Required. The name of the model for which to list the version.
source

pub fn operations_get(&self, name: &str) -> ProjectOperationGetCall<'a, C, A>

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

pub fn operations_cancel( &self, name: &str, ) -> ProjectOperationCancelCall<'a, C, A>

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
  • name - The name of the operation resource to be cancelled.
source

pub fn models_create( &self, request: GoogleCloudMlV1__Model, parent: &str, ) -> ProjectModelCreateCall<'a, C, A>

Create a builder to help you perform the following task:

Creates a model which will later contain one or more versions.

You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create.

§Arguments
  • request - No description provided.
  • parent - Required. The project name.
source

pub fn models_delete(&self, name: &str) -> ProjectModelDeleteCall<'a, C, A>

Create a builder to help you perform the following task:

Deletes a model.

You can only delete a model if there are no versions in it. You can delete versions by calling projects.models.versions.delete.

§Arguments
  • name - Required. The name of the model.
source

pub fn jobs_list(&self, parent: &str) -> ProjectJobListCall<'a, C, A>

Create a builder to help you perform the following task:

Lists the jobs in the project.

If there are no jobs that match the request parameters, the list request returns an empty response body: {}.

§Arguments
  • parent - Required. The name of the project for which to list jobs.
source

pub fn models_get(&self, name: &str) -> ProjectModelGetCall<'a, C, A>

Create a builder to help you perform the following task:

Gets information about a model, including its name, the description (if set), and the default version (if at least one version of the model has been deployed).

§Arguments
  • name - Required. The name of the model.
source

pub fn models_list(&self, parent: &str) -> ProjectModelListCall<'a, C, A>

Create a builder to help you perform the following task:

Lists the models in a project.

Each project can contain multiple models, and each model can have multiple versions.

If there are no models that match the request parameters, the list request returns an empty response body: {}.

§Arguments
  • parent - Required. The name of the project whose models are to be listed.

Trait Implementations§

source§

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> 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, 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
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> Typeable for T
where T: Any,

source§

fn get_type(&self) -> TypeId

Get the TypeId of this object.