All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.retail.v2.model.GoogleCloudRetailV2PriceInfo Maven / Gradle / Ivy

The newest version!
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.retail.v2.model;

/**
 * The price information of a Product.
 *
 * 

This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Vertex AI Search for Retail API. For a detailed * explanation see: * https://developers.google.com/api-client-library/java/google-http-java-client/json *

* * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class GoogleCloudRetailV2PriceInfo extends com.google.api.client.json.GenericJson { /** * The costs associated with the sale of a particular product. Used for gross profit reporting. * * Profit = price - cost Google Merchant Center property * [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Float cost; /** * The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency- * codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is * returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share * the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String currencyCode; /** * Price of the product without any discount. If zero, by default set to be the price. If set, * original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is * thrown. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Float originalPrice; /** * Price of the product. Google Merchant Center property * [price](https://support.google.com/merchants/answer/6324371). Schema.org property * [Offer.price](https://schema.org/price). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Float price; /** * The timestamp when the price starts to be effective. This can be set as a future timestamp, and * the price is only used for search after price_effective_time. If so, the original_price must be * set and original_price is used before price_effective_time. Do not set if price is always * effective because it will cause additional latency during search. * The value may be {@code null}. */ @com.google.api.client.util.Key private String priceEffectiveTime; /** * The timestamp when the price stops to be effective. The price is used for search before * price_expire_time. If this field is set, the original_price must be set and original_price is * used after price_expire_time. Do not set if price is always effective because it will cause * additional latency during search. * The value may be {@code null}. */ @com.google.api.client.util.Key private String priceExpireTime; /** * Output only. The price range of all the child Product.Type.VARIANT Products grouped together on * the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This * field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. * The value may be {@code null}. */ @com.google.api.client.util.Key private GoogleCloudRetailV2PriceInfoPriceRange priceRange; /** * The costs associated with the sale of a particular product. Used for gross profit reporting. * * Profit = price - cost Google Merchant Center property * [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). * @return value or {@code null} for none */ public java.lang.Float getCost() { return cost; } /** * The costs associated with the sale of a particular product. Used for gross profit reporting. * * Profit = price - cost Google Merchant Center property * [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895). * @param cost cost or {@code null} for none */ public GoogleCloudRetailV2PriceInfo setCost(java.lang.Float cost) { this.cost = cost; return this; } /** * The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency- * codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is * returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share * the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. * @return value or {@code null} for none */ public java.lang.String getCurrencyCode() { return currencyCode; } /** * The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency- * codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is * returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share * the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned. * @param currencyCode currencyCode or {@code null} for none */ public GoogleCloudRetailV2PriceInfo setCurrencyCode(java.lang.String currencyCode) { this.currencyCode = currencyCode; return this; } /** * Price of the product without any discount. If zero, by default set to be the price. If set, * original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is * thrown. * @return value or {@code null} for none */ public java.lang.Float getOriginalPrice() { return originalPrice; } /** * Price of the product without any discount. If zero, by default set to be the price. If set, * original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is * thrown. * @param originalPrice originalPrice or {@code null} for none */ public GoogleCloudRetailV2PriceInfo setOriginalPrice(java.lang.Float originalPrice) { this.originalPrice = originalPrice; return this; } /** * Price of the product. Google Merchant Center property * [price](https://support.google.com/merchants/answer/6324371). Schema.org property * [Offer.price](https://schema.org/price). * @return value or {@code null} for none */ public java.lang.Float getPrice() { return price; } /** * Price of the product. Google Merchant Center property * [price](https://support.google.com/merchants/answer/6324371). Schema.org property * [Offer.price](https://schema.org/price). * @param price price or {@code null} for none */ public GoogleCloudRetailV2PriceInfo setPrice(java.lang.Float price) { this.price = price; return this; } /** * The timestamp when the price starts to be effective. This can be set as a future timestamp, and * the price is only used for search after price_effective_time. If so, the original_price must be * set and original_price is used before price_effective_time. Do not set if price is always * effective because it will cause additional latency during search. * @return value or {@code null} for none */ public String getPriceEffectiveTime() { return priceEffectiveTime; } /** * The timestamp when the price starts to be effective. This can be set as a future timestamp, and * the price is only used for search after price_effective_time. If so, the original_price must be * set and original_price is used before price_effective_time. Do not set if price is always * effective because it will cause additional latency during search. * @param priceEffectiveTime priceEffectiveTime or {@code null} for none */ public GoogleCloudRetailV2PriceInfo setPriceEffectiveTime(String priceEffectiveTime) { this.priceEffectiveTime = priceEffectiveTime; return this; } /** * The timestamp when the price stops to be effective. The price is used for search before * price_expire_time. If this field is set, the original_price must be set and original_price is * used after price_expire_time. Do not set if price is always effective because it will cause * additional latency during search. * @return value or {@code null} for none */ public String getPriceExpireTime() { return priceExpireTime; } /** * The timestamp when the price stops to be effective. The price is used for search before * price_expire_time. If this field is set, the original_price must be set and original_price is * used after price_expire_time. Do not set if price is always effective because it will cause * additional latency during search. * @param priceExpireTime priceExpireTime or {@code null} for none */ public GoogleCloudRetailV2PriceInfo setPriceExpireTime(String priceExpireTime) { this.priceExpireTime = priceExpireTime; return this; } /** * Output only. The price range of all the child Product.Type.VARIANT Products grouped together on * the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This * field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. * @return value or {@code null} for none */ public GoogleCloudRetailV2PriceInfoPriceRange getPriceRange() { return priceRange; } /** * Output only. The price range of all the child Product.Type.VARIANT Products grouped together on * the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This * field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests. * @param priceRange priceRange or {@code null} for none */ public GoogleCloudRetailV2PriceInfo setPriceRange(GoogleCloudRetailV2PriceInfoPriceRange priceRange) { this.priceRange = priceRange; return this; } @Override public GoogleCloudRetailV2PriceInfo set(String fieldName, Object value) { return (GoogleCloudRetailV2PriceInfo) super.set(fieldName, value); } @Override public GoogleCloudRetailV2PriceInfo clone() { return (GoogleCloudRetailV2PriceInfo) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy