Class CarrierRate (0.1.0)

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

Static Fields

CARRIER_FIELD_NUMBER

public static final int CARRIER_FIELD_NUMBER
Field Value
Type Description
int

CARRIER_SERVICE_FIELD_NUMBER

public static final int CARRIER_SERVICE_FIELD_NUMBER
Field Value
Type Description
int

FLAT_ADJUSTMENT_FIELD_NUMBER

public static final int FLAT_ADJUSTMENT_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

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

PERCENTAGE_ADJUSTMENT_FIELD_NUMBER

public static final int PERCENTAGE_ADJUSTMENT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CarrierRate getDefaultInstance()
Returns
Type Description
CarrierRate

getDescriptor()

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

newBuilder()

public static CarrierRate.Builder newBuilder()
Returns
Type Description
CarrierRate.Builder

newBuilder(CarrierRate prototype)

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

parseDelimitedFrom(InputStream input)

public static CarrierRate parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CarrierRate
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static CarrierRate parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CarrierRate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static CarrierRate parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CarrierRate
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static CarrierRate parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CarrierRate
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static CarrierRate parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CarrierRate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<CarrierRate> parser()
Returns
Type Description
Parser<CarrierRate>

Methods

equals(Object obj)

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

getCarrier()

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.

getCarrierBytes()

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.

getCarrierService()

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.

getCarrierServiceBytes()

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.

getDefaultInstanceForType()

public CarrierRate getDefaultInstanceForType()
Returns
Type Description
CarrierRate

getFlatAdjustment()

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.

getFlatAdjustmentOrBuilder()

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

getName()

public String getName()

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.

getNameBytes()

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.

getParserForType()

public Parser<CarrierRate> getParserForType()
Returns
Type Description
Parser<CarrierRate>
Overrides

getPercentageAdjustment()

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.

getPercentageAdjustmentBytes()

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasCarrier()

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.

hasCarrierService()

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.

hasFlatAdjustment()

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.

hasName()

public boolean hasName()

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.

hasPercentageAdjustment()

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.

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 CarrierRate.Builder newBuilderForType()
Returns
Type Description
CarrierRate.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public CarrierRate.Builder toBuilder()
Returns
Type Description
CarrierRate.Builder

writeTo(CodedOutputStream output)

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