Class CarrierRate.Builder (0.11.0)

public static final class CarrierRate.Builder extends GeneratedMessageV3.Builder<CarrierRate.Builder> 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 Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CarrierRate.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CarrierRate.Builder
Overrides

build()

public CarrierRate build()
Returns
Type Description
CarrierRate

buildPartial()

public CarrierRate buildPartial()
Returns
Type Description
CarrierRate

clear()

public CarrierRate.Builder clear()
Returns
Type Description
CarrierRate.Builder
Overrides

clearCarrier()

public CarrierRate.Builder clearCarrier()

Required. Carrier service, such as "UPS" or "Fedex".

optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

clearCarrierService()

public CarrierRate.Builder clearCarrierService()

Required. Carrier service, such as "ground" or "2 days".

optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CarrierRate.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CarrierRate.Builder
Overrides

clearFlatAdjustment()

public CarrierRate.Builder clearFlatAdjustment()

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
CarrierRate.Builder

clearName()

public CarrierRate.Builder clearName()

Required. Name of the carrier rate. Must be unique per rate group.

optional string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CarrierRate.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CarrierRate.Builder
Overrides

clearOriginPostalCode()

public CarrierRate.Builder clearOriginPostalCode()

Required. Shipping origin for this carrier rate.

optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

clearPercentageAdjustment()

public CarrierRate.Builder clearPercentageAdjustment()

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
CarrierRate.Builder

This builder for chaining.

clone()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

getFlatAdjustmentBuilder()

public Price.Builder getFlatAdjustmentBuilder()

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.Builder

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.

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFlatAdjustment(Price value)

public CarrierRate.Builder mergeFlatAdjustment(Price value)

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];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
CarrierRate.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CarrierRate.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CarrierRate.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CarrierRate.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CarrierRate.Builder
Overrides

mergeFrom(CarrierRate other)

public CarrierRate.Builder mergeFrom(CarrierRate other)
Parameter
Name Description
other CarrierRate
Returns
Type Description
CarrierRate.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CarrierRate.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CarrierRate.Builder
Overrides

setCarrier(String value)

public CarrierRate.Builder setCarrier(String value)

Required. Carrier service, such as "UPS" or "Fedex".

optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The carrier to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setCarrierBytes(ByteString value)

public CarrierRate.Builder setCarrierBytes(ByteString value)

Required. Carrier service, such as "UPS" or "Fedex".

optional string carrier = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for carrier to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setCarrierService(String value)

public CarrierRate.Builder setCarrierService(String value)

Required. Carrier service, such as "ground" or "2 days".

optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The carrierService to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setCarrierServiceBytes(ByteString value)

public CarrierRate.Builder setCarrierServiceBytes(ByteString value)

Required. Carrier service, such as "ground" or "2 days".

optional string carrier_service = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for carrierService to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CarrierRate.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CarrierRate.Builder
Overrides

setFlatAdjustment(Price value)

public CarrierRate.Builder setFlatAdjustment(Price value)

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];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
CarrierRate.Builder

setFlatAdjustment(Price.Builder builderForValue)

public CarrierRate.Builder setFlatAdjustment(Price.Builder builderForValue)

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];

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
CarrierRate.Builder

setName(String value)

public CarrierRate.Builder setName(String value)

Required. Name of the carrier rate. Must be unique per rate group.

optional string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setNameBytes(ByteString value)

public CarrierRate.Builder setNameBytes(ByteString value)

Required. Name of the carrier rate. Must be unique per rate group.

optional string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setOriginPostalCode(String value)

public CarrierRate.Builder setOriginPostalCode(String value)

Required. Shipping origin for this carrier rate.

optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The originPostalCode to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setOriginPostalCodeBytes(ByteString value)

public CarrierRate.Builder setOriginPostalCodeBytes(ByteString value)

Required. Shipping origin for this carrier rate.

optional string origin_postal_code = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for originPostalCode to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setPercentageAdjustment(String value)

public CarrierRate.Builder setPercentageAdjustment(String value)

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];

Parameter
Name Description
value String

The percentageAdjustment to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setPercentageAdjustmentBytes(ByteString value)

public CarrierRate.Builder setPercentageAdjustmentBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for percentageAdjustment to set.

Returns
Type Description
CarrierRate.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CarrierRate.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CarrierRate.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CarrierRate.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CarrierRate.Builder
Overrides