Class ProductAttributes.CarrierShipping (1.4.0)

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

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > ProductAttributes.CarrierShipping

Static Fields

CARRIER_PRICE_FIELD_NUMBER

public static final int CARRIER_PRICE_FIELD_NUMBER
Field Value
Type Description
int

CARRIER_PRICE_FLAT_ADJUSTMENT_FIELD_NUMBER

public static final int CARRIER_PRICE_FLAT_ADJUSTMENT_FIELD_NUMBER
Field Value
Type Description
int

CARRIER_PRICE_PERCENTAGE_ADJUSTMENT_FIELD_NUMBER

public static final int CARRIER_PRICE_PERCENTAGE_ADJUSTMENT_FIELD_NUMBER
Field Value
Type Description
int

CARRIER_TRANSIT_TIME_FIELD_NUMBER

public static final int CARRIER_TRANSIT_TIME_FIELD_NUMBER
Field Value
Type Description
int

COUNTRY_FIELD_NUMBER

public static final int COUNTRY_FIELD_NUMBER
Field Value
Type Description
int

FIXED_MAX_TRANSIT_TIME_FIELD_NUMBER

public static final int FIXED_MAX_TRANSIT_TIME_FIELD_NUMBER
Field Value
Type Description
int

FIXED_MIN_TRANSIT_TIME_FIELD_NUMBER

public static final int FIXED_MIN_TRANSIT_TIME_FIELD_NUMBER
Field Value
Type Description
int

FLAT_PRICE_FIELD_NUMBER

public static final int FLAT_PRICE_FIELD_NUMBER
Field Value
Type Description
int

MAX_HANDLING_TIME_FIELD_NUMBER

public static final int MAX_HANDLING_TIME_FIELD_NUMBER
Field Value
Type Description
int

MIN_HANDLING_TIME_FIELD_NUMBER

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

REGION_FIELD_NUMBER

public static final int REGION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ProductAttributes.CarrierShipping getDefaultInstance()
Returns
Type Description
ProductAttributes.CarrierShipping

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ProductAttributes.CarrierShipping.Builder newBuilder()
Returns
Type Description
ProductAttributes.CarrierShipping.Builder

newBuilder(ProductAttributes.CarrierShipping prototype)

public static ProductAttributes.CarrierShipping.Builder newBuilder(ProductAttributes.CarrierShipping prototype)
Parameter
Name Description
prototype ProductAttributes.CarrierShipping
Returns
Type Description
ProductAttributes.CarrierShipping.Builder

parseDelimitedFrom(InputStream input)

public static ProductAttributes.CarrierShipping parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.CarrierShipping parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ProductAttributes.CarrierShipping parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.CarrierShipping parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ProductAttributes.CarrierShipping parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.CarrierShipping parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ProductAttributes.CarrierShipping parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.CarrierShipping parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ProductAttributes.CarrierShipping parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.CarrierShipping parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ProductAttributes.CarrierShipping parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.CarrierShipping parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.CarrierShipping
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ProductAttributes.CarrierShipping> parser()
Returns
Type Description
Parser<CarrierShipping>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCarrierPrice()

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;

Returns
Type Description
ProductAttributes.CarrierPriceOption

The carrierPrice.

getCarrierPriceFlatAdjustment()

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.

getCarrierPriceFlatAdjustmentOrBuilder()

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

getCarrierPricePercentageAdjustment()

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.

getCarrierPriceValue()

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.

getCarrierTransitTime()

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;

Returns
Type Description
CarrierTransitTimeOption

The carrierTransitTime.

getCarrierTransitTimeValue()

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.

getCountry()

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.

getCountryBytes()

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.

getDefaultInstanceForType()

public ProductAttributes.CarrierShipping getDefaultInstanceForType()
Returns
Type Description
ProductAttributes.CarrierShipping

getFixedMaxTransitTime()

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.

getFixedMinTransitTime()

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.

getFlatPrice()

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.

getFlatPriceOrBuilder()

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

getMaxHandlingTime()

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.

getMinHandlingTime()

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.

getParserForType()

public Parser<ProductAttributes.CarrierShipping> getParserForType()
Returns
Type Description
Parser<CarrierShipping>
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.

getRegion()

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.

getRegionBytes()

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasCarrierPrice()

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.

hasCarrierPriceFlatAdjustment()

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.

hasCarrierPricePercentageAdjustment()

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.

hasCarrierTransitTime()

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.

hasCountry()

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.

hasFixedMaxTransitTime()

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.

hasFixedMinTransitTime()

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.

hasFlatPrice()

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.

hasMaxHandlingTime()

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.

hasMinHandlingTime()

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.

hasRegion()

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ProductAttributes.CarrierShipping.Builder newBuilderForType()
Returns
Type Description
ProductAttributes.CarrierShipping.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ProductAttributes.CarrierShipping.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ProductAttributes.CarrierShipping.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ProductAttributes.CarrierShipping.Builder toBuilder()
Returns
Type Description
ProductAttributes.CarrierShipping.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException