public final class CarrierRate extends GeneratedMessageV3 implements CarrierRateOrBuilder
A list of carrier rates that can be referred to by
main_table
or single_value
.
Protobuf type google.shopping.merchant.accounts.v1beta.CarrierRate
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_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int CARRIER_SERVICE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int FLAT_ADJUSTMENT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int NAME_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 |
|
public static final int PERCENTAGE_ADJUSTMENT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
public static CarrierRate getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static CarrierRate.Builder newBuilder()
public static CarrierRate.Builder newBuilder(CarrierRate prototype)
public static CarrierRate parseDelimitedFrom(InputStream input)
public static CarrierRate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static CarrierRate parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
public static CarrierRate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CarrierRate parseFrom(ByteString data)
public static CarrierRate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CarrierRate parseFrom(CodedInputStream input)
public static CarrierRate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static CarrierRate parseFrom(InputStream input)
public static CarrierRate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static CarrierRate parseFrom(ByteBuffer data)
public static CarrierRate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<CarrierRate> parser()
Methods
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public String getCarrier()
Required. Carrier service, such as "UPS"
or "Fedex"
.
optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The carrier.
|
public ByteString getCarrierBytes()
Required. Carrier service, such as "UPS"
or "Fedex"
.
optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for carrier.
|
public String getCarrierService()
Required. Carrier service, such as "ground"
or "2 days"
.
optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The carrierService.
|
public ByteString getCarrierServiceBytes()
Required. Carrier service, such as "ground"
or "2 days"
.
optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for carrierService.
|
public CarrierRate getDefaultInstanceForType()
public Price getFlatAdjustment()
Optional. Additive shipping rate modifier. Can be negative. For example
{ "amount_micros": 1, "currency_code" : "USD" }
adds $1 to the rate,
{ "amount_micros": -3, "currency_code" : "USD" }
removes $3 from the
rate.
optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
com.google.shopping.type.Price |
The flatAdjustment.
|
public PriceOrBuilder getFlatAdjustmentOrBuilder()
Optional. Additive shipping rate modifier. Can be negative. For example
{ "amount_micros": 1, "currency_code" : "USD" }
adds $1 to the rate,
{ "amount_micros": -3, "currency_code" : "USD" }
removes $3 from the
rate.
optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
com.google.shopping.type.PriceOrBuilder |
|
Required. Name of the carrier rate. Must be unique per rate group.
optional string name = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The name.
|
public ByteString getNameBytes()
Required. Name of the carrier rate. Must be unique per rate group.
optional string name = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
getOriginPostalCode()
public String getOriginPostalCode()
Required. Shipping origin for this carrier rate.
optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The originPostalCode.
|
getOriginPostalCodeBytes()
public ByteString getOriginPostalCodeBytes()
Required. Shipping origin for this carrier rate.
optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for originPostalCode.
|
public Parser<CarrierRate> getParserForType()
Overrides
public String getPercentageAdjustment()
Optional. Multiplicative shipping rate modifier as a number in decimal
notation. Can be negative. For example "5.4"
increases the rate by 5.4%,
"-3"
decreases the rate by 3%.
optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
String |
The percentageAdjustment.
|
public ByteString getPercentageAdjustmentBytes()
Optional. Multiplicative shipping rate modifier as a number in decimal
notation. Can be negative. For example "5.4"
increases the rate by 5.4%,
"-3"
decreases the rate by 3%.
optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
ByteString |
The bytes for percentageAdjustment.
|
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
public boolean hasCarrier()
Required. Carrier service, such as "UPS"
or "Fedex"
.
optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
boolean |
Whether the carrier field is set.
|
public boolean hasCarrierService()
Required. Carrier service, such as "ground"
or "2 days"
.
optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
boolean |
Whether the carrierService field is set.
|
public boolean hasFlatAdjustment()
Optional. Additive shipping rate modifier. Can be negative. For example
{ "amount_micros": 1, "currency_code" : "USD" }
adds $1 to the rate,
{ "amount_micros": -3, "currency_code" : "USD" }
removes $3 from the
rate.
optional .google.shopping.type.Price flat_adjustment = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the flatAdjustment field is set.
|
Required. Name of the carrier rate. Must be unique per rate group.
optional string name = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
boolean |
Whether the name field is set.
|
hasOriginPostalCode()
public boolean hasOriginPostalCode()
Required. Shipping origin for this carrier rate.
optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
boolean |
Whether the originPostalCode field is set.
|
public boolean hasPercentageAdjustment()
Optional. Multiplicative shipping rate modifier as a number in decimal
notation. Can be negative. For example "5.4"
increases the rate by 5.4%,
"-3"
decreases the rate by 3%.
optional string percentage_adjustment = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the percentageAdjustment field is set.
|
Returns |
Type |
Description |
int |
|
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public CarrierRate.Builder newBuilderForType()
protected CarrierRate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
public CarrierRate.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides