pub struct LfpInventory {
Show 14 fields pub name: String, pub target_account: i64, pub store_code: String, pub offer_id: String, pub region_code: String, pub content_language: String, pub gtin: Option<String>, pub price: Option<Price>, pub availability: String, pub quantity: Option<i64>, pub collection_time: Option<Timestamp>, pub pickup_method: Option<String>, pub pickup_sla: Option<String>, pub feed_label: Option<String>,
}
Expand description

Local Inventory for the merchant.

Fields§

§name: String

Output only. Identifier. The name for the LfpInventory resource. Format: accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}

§target_account: i64

Required. The Merchant Center ID of the merchant to submit the inventory for.

§store_code: String

Required. The identifier of the merchant’s store. Either the store code inserted through InsertLfpStore or the store code in the Business Profile.

§offer_id: String

Required. Immutable. A unique identifier for the product. If both inventories and sales are submitted for a merchant, this id should match for the same product.

Note: if the merchant sells the same product new and used, they should have different IDs.

§region_code: String

Required. The CLDR territory code for the country where the product is sold.

§content_language: String

Required. The two-letter ISO 639-1 language code for the item.

§gtin: Option<String>

Optional. The Global Trade Item Number of the product.

§price: Option<Price>

Optional. The current price of the product.

§availability: String

Required. Availability of the product at this store. For accepted attribute values, see the local product inventory data specification

§quantity: Option<i64>

Optional. Quantity of the product available at this store. Must be greater than or equal to zero.

§collection_time: Option<Timestamp>

Optional. The time when the inventory is collected. If not set, it will be set to the time when the inventory is submitted.

§pickup_method: Option<String>

Optional. Supported pickup method for this offer. Unless the value is “not supported”, this field must be submitted together with pickupSla. For accepted attribute values, see the local product inventory data specification.

§pickup_sla: Option<String>

Optional. Expected date that an order will be ready for pickup relative to the order date. Must be submitted together with pickupMethod. For accepted attribute values, see the local product inventory data specification.

§feed_label: Option<String>

Optional. The feed label for the product. If this is not set, it will default to regionCode.

Implementations§

source§

impl LfpInventory

source

pub fn gtin(&self) -> &str

Returns the value of gtin, or the default value if gtin is unset.

source

pub fn quantity(&self) -> i64

Returns the value of quantity, or the default value if quantity is unset.

source

pub fn pickup_method(&self) -> &str

Returns the value of pickup_method, or the default value if pickup_method is unset.

source

pub fn pickup_sla(&self) -> &str

Returns the value of pickup_sla, or the default value if pickup_sla is unset.

source

pub fn feed_label(&self) -> &str

Returns the value of feed_label, or the default value if feed_label is unset.

Trait Implementations§

source§

impl Clone for LfpInventory

source§

fn clone(&self) -> LfpInventory

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LfpInventory

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for LfpInventory

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for LfpInventory

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for LfpInventory

source§

fn eq(&self, other: &LfpInventory) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for LfpInventory

Auto Trait Implementations§

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.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

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

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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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