Struct google_retail2::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 CloudRetail hub.

Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_retail2 as retail2;
 
use std::default::Default;
use oauth2;
use retail2::CloudRetail;
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
        secret,
        yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = CloudRetail::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_catalogs_branches_operations_get(...)`, `locations_catalogs_branches_products_create(...)`, `locations_catalogs_branches_products_delete(...)`, `locations_catalogs_branches_products_get(...)`, `locations_catalogs_branches_products_import(...)`, `locations_catalogs_branches_products_patch(...)`, `locations_catalogs_list(...)`, `locations_catalogs_operations_get(...)`, `locations_catalogs_operations_list(...)`, `locations_catalogs_patch(...)`, `locations_catalogs_placements_predict(...)`, `locations_catalogs_user_events_collect(...)`, `locations_catalogs_user_events_import(...)`, `locations_catalogs_user_events_purge(...)`, `locations_catalogs_user_events_rejoin(...)`, `locations_catalogs_user_events_write(...)`, `locations_operations_get(...)` and `locations_operations_list(...)`
// to build up your call.
let rb = hub.projects();

Implementations

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

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

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.

pub fn locations_catalogs_branches_products_create(
    &self,
    request: GoogleCloudRetailV2Product,
    parent: &str
) -> ProjectLocationCatalogBrancheProductCreateCall<'a>
[src]

Create a builder to help you perform the following task:

Creates a Product.

Arguments

  • request - No description provided.
  • parent - Required. The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch.

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

Create a builder to help you perform the following task:

Deletes a Product.

Arguments

  • name - Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named Product will be deleted.

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

Create a builder to help you perform the following task:

Gets a Product.

Arguments

  • name - Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Product does not exist, a NOT_FOUND error is returned.

pub fn locations_catalogs_branches_products_import(
    &self,
    request: GoogleCloudRetailV2ImportProductsRequest,
    parent: &str
) -> ProjectLocationCatalogBrancheProductImportCall<'a>
[src]

Create a builder to help you perform the following task:

Bulk import of multiple Products. Request processing may be synchronous. No partial updating is supported. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated.

Arguments

  • request - No description provided.
  • parent - Required. projects/1234/locations/global/catalogs/default_catalog/branches/default_branch If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.

pub fn locations_catalogs_branches_products_patch(
    &self,
    request: GoogleCloudRetailV2Product,
    name: &str
) -> ProjectLocationCatalogBrancheProductPatchCall<'a>
[src]

Create a builder to help you perform the following task:

Updates a Product.

Arguments

  • request - No description provided.
  • name - Immutable. Full resource name of the product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id. The branch ID must be “default_branch”.

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

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.

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

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.

pub fn locations_catalogs_placements_predict(
    &self,
    request: GoogleCloudRetailV2PredictRequest,
    placement: &str
) -> ProjectLocationCatalogPlacementPredictCall<'a>
[src]

Create a builder to help you perform the following task:

Makes a recommendation prediction.

Arguments

  • request - No description provided.
  • placement - Required. Full resource name of the format: {name=projects//locations/global/catalogs/default_catalog/placements/} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see Managing placements. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements

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

Create a builder to help you perform the following task:

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.

Arguments

  • parent - Required. The parent catalog name, such as projects/1234/locations/global/catalogs/default_catalog.

pub fn locations_catalogs_user_events_import(
    &self,
    request: GoogleCloudRetailV2ImportUserEventsRequest,
    parent: &str
) -> ProjectLocationCatalogUserEventImportCall<'a>
[src]

Create a builder to help you perform the following task:

Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.

Arguments

  • request - No description provided.
  • parent - Required. projects/1234/locations/global/catalogs/default_catalog

pub fn locations_catalogs_user_events_purge(
    &self,
    request: GoogleCloudRetailV2PurgeUserEventsRequest,
    parent: &str
) -> ProjectLocationCatalogUserEventPurgeCall<'a>
[src]

Create a builder to help you perform the following task:

Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.

Arguments

  • request - No description provided.
  • parent - Required. The resource name of the catalog under which the events are created. The format is projects/${projectId}/locations/global/catalogs/${catalogId}

pub fn locations_catalogs_user_events_rejoin(
    &self,
    request: GoogleCloudRetailV2RejoinUserEventsRequest,
    parent: &str
) -> ProjectLocationCatalogUserEventRejoinCall<'a>
[src]

Create a builder to help you perform the following task:

Triggers a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a ‘join’ operation on specified events with latest version of product catalog. It can also be used to correct events joined with wrong product catalog.

Arguments

  • request - No description provided.
  • parent - Required. The parent catalog resource name, such as projects/1234/locations/global/catalogs/default_catalog.

pub fn locations_catalogs_user_events_write(
    &self,
    request: GoogleCloudRetailV2UserEvent,
    parent: &str
) -> ProjectLocationCatalogUserEventWriteCall<'a>
[src]

Create a builder to help you perform the following task:

Writes a single user event.

Arguments

  • request - No description provided.
  • parent - Required. The parent catalog resource name, such as projects/1234/locations/global/catalogs/default_catalog.

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

Create a builder to help you perform the following task:

Lists all the Catalogs associated with the project.

Arguments

  • parent - Required. The account resource name with an associated location. If the caller does not have permission to list Catalogs under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

pub fn locations_catalogs_patch(
    &self,
    request: GoogleCloudRetailV2Catalog,
    name: &str
) -> ProjectLocationCatalogPatchCall<'a>
[src]

Create a builder to help you perform the following task:

Updates the Catalogs.

Arguments

  • request - No description provided.
  • name - Required. Immutable. The fully qualified resource name of the catalog.

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

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.

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

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.

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.