public static final class ProductAttributes.CarrierShipping extends GeneratedMessageV3 implements ProductAttributes.CarrierShippingOrBuilder
Carrier-based shipping configuration. Allows for setting shipping speed or
shipping cost based on a carrier's provided info.
Protobuf type google.shopping.merchant.products.v1.ProductAttributes.CarrierShipping
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int CARRIER_PRICE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int CARRIER_PRICE_FLAT_ADJUSTMENT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int CARRIER_PRICE_PERCENTAGE_ADJUSTMENT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int CARRIER_TRANSIT_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int COUNTRY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int FIXED_MAX_TRANSIT_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int FIXED_MIN_TRANSIT_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int FLAT_PRICE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int MAX_HANDLING_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int MIN_HANDLING_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
ORIGIN_POSTAL_CODE_FIELD_NUMBER
public static final int ORIGIN_POSTAL_CODE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
POSTAL_CODE_FIELD_NUMBER
public static final int POSTAL_CODE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int REGION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
public static ProductAttributes.CarrierShipping getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static ProductAttributes.CarrierShipping.Builder newBuilder()
public static ProductAttributes.CarrierShipping.Builder newBuilder(ProductAttributes.CarrierShipping prototype)
public static ProductAttributes.CarrierShipping parseDelimitedFrom(InputStream input)
public static ProductAttributes.CarrierShipping parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ProductAttributes.CarrierShipping parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
public static ProductAttributes.CarrierShipping parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ProductAttributes.CarrierShipping parseFrom(ByteString data)
public static ProductAttributes.CarrierShipping parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ProductAttributes.CarrierShipping parseFrom(CodedInputStream input)
public static ProductAttributes.CarrierShipping parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ProductAttributes.CarrierShipping parseFrom(InputStream input)
public static ProductAttributes.CarrierShipping parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ProductAttributes.CarrierShipping parseFrom(ByteBuffer data)
public static ProductAttributes.CarrierShipping parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<ProductAttributes.CarrierShipping> parser()
Methods
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public ProductAttributes.CarrierPriceOption getCarrierPrice()
Selected carrier to calculate the shipping price from. Select a carrier
from the available carriers
list,
for example AUSTRALIA_POST_REGULAR
. Price will be calculated by this
selected carrier, the location expressed in
originPostalCode,
along with the user location to determine the accurate shipping price.
Carrier is represented by a carrier service name or a carrier service ID.
Cannot be set together with
flatPrice.
optional .google.shopping.merchant.products.v1.ProductAttributes.CarrierPriceOption carrier_price = 6;
public Price getCarrierPriceFlatAdjustment()
A flat adjustment on the carrier price. Can be either positive or
negative. Cannot be zero. Requires carrier_price
to be present. Cannot
be set together with
flatPrice
and
carrierPricePercentageAdjustment.
optional .google.shopping.type.Price carrier_price_flat_adjustment = 7;
Returns |
Type |
Description |
com.google.shopping.type.Price |
The carrierPriceFlatAdjustment.
|
public PriceOrBuilder getCarrierPriceFlatAdjustmentOrBuilder()
A flat adjustment on the carrier price. Can be either positive or
negative. Cannot be zero. Requires carrier_price
to be present. Cannot
be set together with
flatPrice
and
carrierPricePercentageAdjustment.
optional .google.shopping.type.Price carrier_price_flat_adjustment = 7;
Returns |
Type |
Description |
com.google.shopping.type.PriceOrBuilder |
|
public double getCarrierPricePercentageAdjustment()
A percentual adjustment on the carrier price. Can be either positive or
negative. Cannot be zero. Requires carrier_price
to be present. Cannot
be set together with
flatPrice
and
carrierPriceFlatAdjustment.
optional double carrier_price_percentage_adjustment = 8;
Returns |
Type |
Description |
double |
The carrierPricePercentageAdjustment.
|
public int getCarrierPriceValue()
Selected carrier to calculate the shipping price from. Select a carrier
from the available carriers
list,
for example AUSTRALIA_POST_REGULAR
. Price will be calculated by this
selected carrier, the location expressed in
originPostalCode,
along with the user location to determine the accurate shipping price.
Carrier is represented by a carrier service name or a carrier service ID.
Cannot be set together with
flatPrice.
optional .google.shopping.merchant.products.v1.ProductAttributes.CarrierPriceOption carrier_price = 6;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for carrierPrice.
|
public CarrierTransitTimeOption getCarrierTransitTime()
Selected carrier to calculate the shipping speed from. Select a carrier
from the available carriers
list,
for example AUSTRALIA_POST_REGULAR
. Speed will be calculated by this
selected carrier, the location expressed in
originPostalCode,
along with the user location to determine the accurate delivery speed.
Carrier is represented by a carrier service name or a carrier service ID.
Cannot be set together with
fixedMaxTransitTime
or
fixedMinTransitTime.
optional .google.shopping.merchant.products.v1.CarrierTransitTimeOption carrier_transit_time = 13;
public int getCarrierTransitTimeValue()
Selected carrier to calculate the shipping speed from. Select a carrier
from the available carriers
list,
for example AUSTRALIA_POST_REGULAR
. Speed will be calculated by this
selected carrier, the location expressed in
originPostalCode,
along with the user location to determine the accurate delivery speed.
Carrier is represented by a carrier service name or a carrier service ID.
Cannot be set together with
fixedMaxTransitTime
or
fixedMinTransitTime.
optional .google.shopping.merchant.products.v1.CarrierTransitTimeOption carrier_transit_time = 13;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for carrierTransitTime.
|
public String getCountry()
The CLDR territory
code
of the country to which an item will ship.
optional string country = 1;
Returns |
Type |
Description |
String |
The country.
|
public ByteString getCountryBytes()
The CLDR territory
code
of the country to which an item will ship.
optional string country = 1;
Returns |
Type |
Description |
ByteString |
The bytes for country.
|
public ProductAttributes.CarrierShipping getDefaultInstanceForType()
public long getFixedMaxTransitTime()
Maximum transit time (inclusive) between when the order has shipped and
when it is delivered in business days. 0 means that the order is
delivered on the same day as it ships. Needs to be provided together with
maxHandlingTime.
Cannot be set if
carrierTransitTime
is present.
optional int64 fixed_max_transit_time = 12;
Returns |
Type |
Description |
long |
The fixedMaxTransitTime.
|
public long getFixedMinTransitTime()
Minimum transit time (inclusive) between when the order has shipped and
when it is delivered in business days. 0 means that the order is
delivered on the same day as it ships.
fixedMinTransitTime
can only be set if
fixedMaxTransitTime
is set. Cannot be set if
carrierTransitTime
is present.
optional int64 fixed_min_transit_time = 11;
Returns |
Type |
Description |
long |
The fixedMinTransitTime.
|
public Price getFlatPrice()
Fixed shipping price, represented as a number with currency. Cannot be
set together with
carrierPrice
or its adjustments
(carrierPriceFlatAdjustment,
carrierPricePercentageAdjustment).
optional .google.shopping.type.Price flat_price = 5;
Returns |
Type |
Description |
com.google.shopping.type.Price |
The flatPrice.
|
public PriceOrBuilder getFlatPriceOrBuilder()
Fixed shipping price, represented as a number with currency. Cannot be
set together with
carrierPrice
or its adjustments
(carrierPriceFlatAdjustment,
carrierPricePercentageAdjustment).
optional .google.shopping.type.Price flat_price = 5;
Returns |
Type |
Description |
com.google.shopping.type.PriceOrBuilder |
|
public long getMaxHandlingTime()
Maximum handling time (inclusive) between when the order is received and
shipped in business days. 0 means that the order is shipped on the same
day as it is received if it happens before the cut-off time. Both
maxHandlingTime
and
fixedMaxTransitTime
or
carrierTransitTime
are required if providing shipping speeds.
optional int64 max_handling_time = 10;
Returns |
Type |
Description |
long |
The maxHandlingTime.
|
public long getMinHandlingTime()
Minimum handling time (inclusive) between when the order is received and
shipped in business days. 0 means that the order is shipped on the same
day as it is received if it happens before the cut-off time.
minHandlingTime
can only be set if
maxHandlingTime
is also set.
optional int64 min_handling_time = 9;
Returns |
Type |
Description |
long |
The minHandlingTime.
|
getOriginPostalCode()
public String getOriginPostalCode()
The source location postal code from which this offer ships. Represented
only by a full-length postal code.
optional string origin_postal_code = 4;
Returns |
Type |
Description |
String |
The originPostalCode.
|
getOriginPostalCodeBytes()
public ByteString getOriginPostalCodeBytes()
The source location postal code from which this offer ships. Represented
only by a full-length postal code.
optional string origin_postal_code = 4;
Returns |
Type |
Description |
ByteString |
The bytes for originPostalCode.
|
public Parser<ProductAttributes.CarrierShipping> getParserForType()
Overrides
getPostalCode()
public String getPostalCode()
The postal code range that the shipping rate applies to, represented by
a postal code (eg. 94043
), a postal code prefix followed by a *
wildcard (eg. 94
), a range between two postal codes (eg.
94043-98033
) or two postal code prefixes of equal length (eg.
94-98*
).
optional string postal_code = 3;
Returns |
Type |
Description |
String |
The postalCode.
|
getPostalCodeBytes()
public ByteString getPostalCodeBytes()
The postal code range that the shipping rate applies to, represented by
a postal code (eg. 94043
), a postal code prefix followed by a *
wildcard (eg. 94
), a range between two postal codes (eg.
94043-98033
) or two postal code prefixes of equal length (eg.
94-98*
).
optional string postal_code = 3;
Returns |
Type |
Description |
ByteString |
The bytes for postalCode.
|
public String getRegion()
The geographic region to which a shipping rate applies.
See region for
more information.
optional string region = 2;
Returns |
Type |
Description |
String |
The region.
|
public ByteString getRegionBytes()
The geographic region to which a shipping rate applies.
See region for
more information.
optional string region = 2;
Returns |
Type |
Description |
ByteString |
The bytes for region.
|
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
public boolean hasCarrierPrice()
Selected carrier to calculate the shipping price from. Select a carrier
from the available carriers
list,
for example AUSTRALIA_POST_REGULAR
. Price will be calculated by this
selected carrier, the location expressed in
originPostalCode,
along with the user location to determine the accurate shipping price.
Carrier is represented by a carrier service name or a carrier service ID.
Cannot be set together with
flatPrice.
optional .google.shopping.merchant.products.v1.ProductAttributes.CarrierPriceOption carrier_price = 6;
Returns |
Type |
Description |
boolean |
Whether the carrierPrice field is set.
|
public boolean hasCarrierPriceFlatAdjustment()
A flat adjustment on the carrier price. Can be either positive or
negative. Cannot be zero. Requires carrier_price
to be present. Cannot
be set together with
flatPrice
and
carrierPricePercentageAdjustment.
optional .google.shopping.type.Price carrier_price_flat_adjustment = 7;
Returns |
Type |
Description |
boolean |
Whether the carrierPriceFlatAdjustment field is set.
|
public boolean hasCarrierPricePercentageAdjustment()
A percentual adjustment on the carrier price. Can be either positive or
negative. Cannot be zero. Requires carrier_price
to be present. Cannot
be set together with
flatPrice
and
carrierPriceFlatAdjustment.
optional double carrier_price_percentage_adjustment = 8;
Returns |
Type |
Description |
boolean |
Whether the carrierPricePercentageAdjustment field is set.
|
public boolean hasCarrierTransitTime()
Selected carrier to calculate the shipping speed from. Select a carrier
from the available carriers
list,
for example AUSTRALIA_POST_REGULAR
. Speed will be calculated by this
selected carrier, the location expressed in
originPostalCode,
along with the user location to determine the accurate delivery speed.
Carrier is represented by a carrier service name or a carrier service ID.
Cannot be set together with
fixedMaxTransitTime
or
fixedMinTransitTime.
optional .google.shopping.merchant.products.v1.CarrierTransitTimeOption carrier_transit_time = 13;
Returns |
Type |
Description |
boolean |
Whether the carrierTransitTime field is set.
|
public boolean hasCountry()
The CLDR territory
code
of the country to which an item will ship.
optional string country = 1;
Returns |
Type |
Description |
boolean |
Whether the country field is set.
|
public boolean hasFixedMaxTransitTime()
Maximum transit time (inclusive) between when the order has shipped and
when it is delivered in business days. 0 means that the order is
delivered on the same day as it ships. Needs to be provided together with
maxHandlingTime.
Cannot be set if
carrierTransitTime
is present.
optional int64 fixed_max_transit_time = 12;
Returns |
Type |
Description |
boolean |
Whether the fixedMaxTransitTime field is set.
|
public boolean hasFixedMinTransitTime()
Minimum transit time (inclusive) between when the order has shipped and
when it is delivered in business days. 0 means that the order is
delivered on the same day as it ships.
fixedMinTransitTime
can only be set if
fixedMaxTransitTime
is set. Cannot be set if
carrierTransitTime
is present.
optional int64 fixed_min_transit_time = 11;
Returns |
Type |
Description |
boolean |
Whether the fixedMinTransitTime field is set.
|
public boolean hasFlatPrice()
Fixed shipping price, represented as a number with currency. Cannot be
set together with
carrierPrice
or its adjustments
(carrierPriceFlatAdjustment,
carrierPricePercentageAdjustment).
optional .google.shopping.type.Price flat_price = 5;
Returns |
Type |
Description |
boolean |
Whether the flatPrice field is set.
|
public boolean hasMaxHandlingTime()
Maximum handling time (inclusive) between when the order is received and
shipped in business days. 0 means that the order is shipped on the same
day as it is received if it happens before the cut-off time. Both
maxHandlingTime
and
fixedMaxTransitTime
or
carrierTransitTime
are required if providing shipping speeds.
optional int64 max_handling_time = 10;
Returns |
Type |
Description |
boolean |
Whether the maxHandlingTime field is set.
|
public boolean hasMinHandlingTime()
Minimum handling time (inclusive) between when the order is received and
shipped in business days. 0 means that the order is shipped on the same
day as it is received if it happens before the cut-off time.
minHandlingTime
can only be set if
maxHandlingTime
is also set.
optional int64 min_handling_time = 9;
Returns |
Type |
Description |
boolean |
Whether the minHandlingTime field is set.
|
hasOriginPostalCode()
public boolean hasOriginPostalCode()
The source location postal code from which this offer ships. Represented
only by a full-length postal code.
optional string origin_postal_code = 4;
Returns |
Type |
Description |
boolean |
Whether the originPostalCode field is set.
|
hasPostalCode()
public boolean hasPostalCode()
The postal code range that the shipping rate applies to, represented by
a postal code (eg. 94043
), a postal code prefix followed by a *
wildcard (eg. 94
), a range between two postal codes (eg.
94043-98033
) or two postal code prefixes of equal length (eg.
94-98*
).
optional string postal_code = 3;
Returns |
Type |
Description |
boolean |
Whether the postalCode field is set.
|
public boolean hasRegion()
The geographic region to which a shipping rate applies.
See region for
more information.
optional string region = 2;
Returns |
Type |
Description |
boolean |
Whether the region field is set.
|
Returns |
Type |
Description |
int |
|
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public ProductAttributes.CarrierShipping.Builder newBuilderForType()
protected ProductAttributes.CarrierShipping.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
public ProductAttributes.CarrierShipping.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides