pub struct LocalInventory {
    pub name: String,
    pub account: i64,
    pub store_code: String,
    pub price: Option<Price>,
    pub sale_price: Option<Price>,
    pub sale_price_effective_date: Option<Interval>,
    pub availability: Option<String>,
    pub quantity: Option<i64>,
    pub pickup_method: Option<String>,
    pub pickup_sla: Option<String>,
    pub instore_product_location: Option<String>,
    pub custom_attributes: Vec<CustomAttribute>,
}
Expand description

Local inventory information for the product. Represents in-store information for a specific product at the store specified by [storeCode][google.shopping.merchant.inventories.v1beta.LocalInventory.store_code]. For a list of all accepted attribute values, see the local product inventory data specification.

Fields§

§name: String

Output only. The name of the LocalInventory resource. Format: accounts/{account}/products/{product}/localInventories/{store_code}

§account: i64

Output only. The account that owns the product. This field will be ignored if set by the client.

§store_code: String

Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

§price: Option<Price>

Price of the product at this store.

§sale_price: Option<Price>

Sale price of the product at this store. Mandatory if [salePriceEffectiveDate][google.shopping.merchant.inventories.v1beta.LocalInventory.sale_price_effective_date] is defined.

§sale_price_effective_date: Option<Interval>

The TimePeriod of the sale at this store.

§availability: Option<String>

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

§quantity: Option<i64>

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

§pickup_method: Option<String>

Supported pickup method for this product. 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>

Relative time period from the order date for an order for this product, from this store, to be ready for pickup. Must be submitted with pickupMethod. For accepted attribute values, see the local product inventory data specification

§instore_product_location: Option<String>

Location of the product inside the store. Maximum length is 20 bytes.

§custom_attributes: Vec<CustomAttribute>

A list of custom (merchant-provided) attributes. You can also use CustomAttribute to submit any attribute of the data specification in its generic form.

Implementations§

source§

impl LocalInventory

source

pub fn availability(&self) -> &str

Returns the value of availability, or the default value if availability 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 instore_product_location(&self) -> &str

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

Trait Implementations§

source§

impl Clone for LocalInventory

source§

fn clone(&self) -> LocalInventory

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 LocalInventory

source§

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

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

impl Default for LocalInventory

source§

fn default() -> Self

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

impl Message for LocalInventory

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 LocalInventory

source§

fn eq(&self, other: &LocalInventory) -> 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 LocalInventory

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