Struct google_recommender1_beta1::api::ProjectMethods[][src]

pub struct ProjectMethods<'a> { /* fields omitted */ }

A builder providing access to all methods supported on project resources. It is not used directly, but through the Recommender hub.

Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_recommender1_beta1 as recommender1_beta1;
 
use std::default::Default;
use oauth2;
use recommender1_beta1::Recommender;
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
        secret,
        yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = Recommender::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_insight_types_insights_get(...)`, `locations_insight_types_insights_list(...)`, `locations_insight_types_insights_mark_accepted(...)`, `locations_recommenders_recommendations_get(...)`, `locations_recommenders_recommendations_list(...)`, `locations_recommenders_recommendations_mark_claimed(...)`, `locations_recommenders_recommendations_mark_failed(...)` and `locations_recommenders_recommendations_mark_succeeded(...)`
// to build up your call.
let rb = hub.projects();

Implementations

impl<'a> ProjectMethods<'a>[src]

pub fn locations_insight_types_insights_get(
    &self,
    name: &str
) -> ProjectLocationInsightTypeInsightGetCall<'a>
[src]

Create a builder to help you perform the following task:

Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.

Arguments

  • name - Required. Name of the insight.

pub fn locations_insight_types_insights_list(
    &self,
    parent: &str
) -> ProjectLocationInsightTypeInsightListCall<'a>
[src]

Create a builder to help you perform the following task:

Lists insights for a Cloud project. Requires the recommender.*.list IAM permission for the specified insight type.

Arguments

  • parent - Required. The container resource on which to execute the request. Acceptable formats: 1. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID] 2. billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID] 3. folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID] 4. organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID] LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.

pub fn locations_insight_types_insights_mark_accepted(
    &self,
    request: GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest,
    name: &str
) -> ProjectLocationInsightTypeInsightMarkAcceptedCall<'a>
[src]

Create a builder to help you perform the following task:

Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.

Arguments

  • request - No description provided.
  • name - Required. Name of the insight.

pub fn locations_recommenders_recommendations_get(
    &self,
    name: &str
) -> ProjectLocationRecommenderRecommendationGetCall<'a>
[src]

Create a builder to help you perform the following task:

Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.

Arguments

  • name - Required. Name of the recommendation.

pub fn locations_recommenders_recommendations_list(
    &self,
    parent: &str
) -> ProjectLocationRecommenderRecommendationListCall<'a>
[src]

Create a builder to help you perform the following task:

Lists recommendations for a Cloud project. Requires the recommender.*.list IAM permission for the specified recommender.

Arguments

  • parent - Required. The container resource on which to execute the request. Acceptable formats: 1. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID] 2. billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID] 3. folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID] 4. organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID] LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.

pub fn locations_recommenders_recommendations_mark_claimed(
    &self,
    request: GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest,
    name: &str
) -> ProjectLocationRecommenderRecommendationMarkClaimedCall<'a>
[src]

Create a builder to help you perform the following task:

Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.

Arguments

  • request - No description provided.
  • name - Required. Name of the recommendation.

pub fn locations_recommenders_recommendations_mark_failed(
    &self,
    request: GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest,
    name: &str
) -> ProjectLocationRecommenderRecommendationMarkFailedCall<'a>
[src]

Create a builder to help you perform the following task:

Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.

Arguments

  • request - No description provided.
  • name - Required. Name of the recommendation.

pub fn locations_recommenders_recommendations_mark_succeeded(
    &self,
    request: GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest,
    name: &str
) -> ProjectLocationRecommenderRecommendationMarkSucceededCall<'a>
[src]

Create a builder to help you perform the following task:

Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.

Arguments

  • request - No description provided.
  • name - Required. Name of the recommendation.

Trait Implementations

Auto Trait Implementations

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

impl<'a> Send for ProjectMethods<'a>

impl<'a> Sync for ProjectMethods<'a>

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

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.