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.
Supported carrier services are defined in
https://support.google.com/merchants/answer/12577710?ref_topic=12570808&sjid=10662598224319463032-NC#zippy=%2Cdelivery-cost-rate-type%2Ccarrier-rate-au-de-uk-and-us-only.
Protobuf type google.shopping.merchant.accounts.v1.CarrierRate
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > CarrierRate.BuilderImplements
CarrierRateOrBuilderStatic 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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public CarrierRate.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
CarrierRate.Builder |
|
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 |
|
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 |
StringThe 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 |
ByteStringThe 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 |
StringThe 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 |
ByteStringThe 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 |
|
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 |
StringThe 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 |
ByteStringThe 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 |
StringThe 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 |
ByteStringThe 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 |
StringThe 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 |
ByteStringThe 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 |
|
setUnknownFields(UnknownFieldSet unknownFields)
public final CarrierRate.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
CarrierRate.Builder |
|