pub struct FolderMethods<'a, S>
where S: 'a,
{ /* private fields */ }
Expand description

A builder providing access to all methods supported on folder 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 google_recommender1 as recommender1;
 
use std::default::Default;
use recommender1::{Recommender, 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 = Recommender::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_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_dismissed(...)`, `locations_recommenders_recommendations_mark_failed(...)` and `locations_recommenders_recommendations_mark_succeeded(...)`
// to build up your call.
let rb = hub.folders();

Implementations§

source§

impl<'a, S> FolderMethods<'a, S>

source

pub fn locations_insight_types_insights_get( &self, name: &str ) -> FolderLocationInsightTypeInsightGetCall<'a, S>

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

pub fn locations_insight_types_insights_list( &self, parent: &str ) -> FolderLocationInsightTypeInsightListCall<'a, S>

Create a builder to help you perform the following task:

Lists insights for the specified Cloud Resource. 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: * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID] * projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID] * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID] * folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID] * 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.
source

pub fn locations_insight_types_insights_mark_accepted( &self, request: GoogleCloudRecommenderV1MarkInsightAcceptedRequest, name: &str ) -> FolderLocationInsightTypeInsightMarkAcceptedCall<'a, S>

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

pub fn locations_recommenders_recommendations_get( &self, name: &str ) -> FolderLocationRecommenderRecommendationGetCall<'a, S>

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

pub fn locations_recommenders_recommendations_list( &self, parent: &str ) -> FolderLocationRecommenderRecommendationListCall<'a, S>

Create a builder to help you perform the following task:

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

§Arguments
  • parent - Required. The container resource on which to execute the request. Acceptable formats: * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID] * projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID] * billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID] * folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID] * 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.
source

pub fn locations_recommenders_recommendations_mark_claimed( &self, request: GoogleCloudRecommenderV1MarkRecommendationClaimedRequest, name: &str ) -> FolderLocationRecommenderRecommendationMarkClaimedCall<'a, S>

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, SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.

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

pub fn locations_recommenders_recommendations_mark_dismissed( &self, request: GoogleCloudRecommenderV1MarkRecommendationDismissedRequest, name: &str ) -> FolderLocationRecommenderRecommendationMarkDismissedCall<'a, S>

Create a builder to help you perform the following task:

Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.

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

pub fn locations_recommenders_recommendations_mark_failed( &self, request: GoogleCloudRecommenderV1MarkRecommendationFailedRequest, name: &str ) -> FolderLocationRecommenderRecommendationMarkFailedCall<'a, S>

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

pub fn locations_recommenders_recommendations_mark_succeeded( &self, request: GoogleCloudRecommenderV1MarkRecommendationSucceededRequest, name: &str ) -> FolderLocationRecommenderRecommendationMarkSucceededCall<'a, S>

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§

source§

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

impl<'a, S> !UnwindSafe for FolderMethods<'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