Enum googapis::google::cloud::retail::v2::product::Expiration[][src]

pub enum Expiration {
    ExpireTime(Timestamp),
    Ttl(Duration),
}

Variants

ExpireTime(Timestamp)

The timestamp when this product becomes unavailable for [SearchService.Search][google.cloud.retail.v2.SearchService.Search].

If it is set, the [Product][google.cloud.retail.v2.Product] is not available for [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the product can still be retrieved by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] and [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

[expire_time][google.cloud.retail.v2.Product.expire_time] must be later than [available_time][google.cloud.retail.v2.Product.available_time] and [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an INVALID_ARGUMENT error is thrown.

Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).

Tuple Fields of ExpireTime

0: Timestamp
Ttl(Duration)

Input only. The TTL (time to live) of the product.

If it is set, it must be a non-negative value, and [expire_time][google.cloud.retail.v2.Product.expire_time] is set as current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The derived [expire_time][google.cloud.retail.v2.Product.expire_time] is returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is left blank when retrieving the [Product][google.cloud.retail.v2.Product].

If it is set, the product is not available for [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. However, the product can still be retrieved by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] and [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

Tuple Fields of Ttl

0: Duration

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more