public static final class Value.Builder extends GeneratedMessageV3.Builder<Value.Builder> implements ValueOrBuilder
The single value of a rate group or the value of a rate group table's cell.
Exactly one of no_shipping
, flat_rate
,
price_percentage
, carrier_rateName
,
subtable_name
must be set.
Protobuf type google.shopping.merchant.accounts.v1beta.Value
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Value.BuilderImplements
ValueOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Value.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Value.Builder |
build()
public Value build()
Returns | |
---|---|
Type | Description |
Value |
buildPartial()
public Value buildPartial()
Returns | |
---|---|
Type | Description |
Value |
clear()
public Value.Builder clear()
Returns | |
---|---|
Type | Description |
Value.Builder |
clearCarrierRate()
public Value.Builder clearCarrierRate()
The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
optional string carrier_rate = 4;
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Value.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
Value.Builder |
clearFlatRate()
public Value.Builder clearFlatRate()
A flat rate. Can only be set if all other fields are not set.
optional .google.shopping.type.Price flat_rate = 2;
Returns | |
---|---|
Type | Description |
Value.Builder |
clearNoShipping()
public Value.Builder clearNoShipping()
If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set.
optional bool no_shipping = 1;
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Value.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
Value.Builder |
clearPricePercentage()
public Value.Builder clearPricePercentage()
A percentage of the price represented as a number in decimal notation
(For example, "5.4"
). Can only be set if all other fields are not
set.
optional string price_percentage = 3;
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
clearSubtable()
public Value.Builder clearSubtable()
The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set.
optional string subtable = 5;
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
clone()
public Value.Builder clone()
Returns | |
---|---|
Type | Description |
Value.Builder |
getCarrierRate()
public String getCarrierRate()
The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
optional string carrier_rate = 4;
Returns | |
---|---|
Type | Description |
String |
The carrierRate. |
getCarrierRateBytes()
public ByteString getCarrierRateBytes()
The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
optional string carrier_rate = 4;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for carrierRate. |
getDefaultInstanceForType()
public Value getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
Value |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getFlatRate()
public Price getFlatRate()
A flat rate. Can only be set if all other fields are not set.
optional .google.shopping.type.Price flat_rate = 2;
Returns | |
---|---|
Type | Description |
com.google.shopping.type.Price |
The flatRate. |
getFlatRateBuilder()
public Price.Builder getFlatRateBuilder()
A flat rate. Can only be set if all other fields are not set.
optional .google.shopping.type.Price flat_rate = 2;
Returns | |
---|---|
Type | Description |
com.google.shopping.type.Price.Builder |
getFlatRateOrBuilder()
public PriceOrBuilder getFlatRateOrBuilder()
A flat rate. Can only be set if all other fields are not set.
optional .google.shopping.type.Price flat_rate = 2;
Returns | |
---|---|
Type | Description |
com.google.shopping.type.PriceOrBuilder |
getNoShipping()
public boolean getNoShipping()
If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set.
optional bool no_shipping = 1;
Returns | |
---|---|
Type | Description |
boolean |
The noShipping. |
getPricePercentage()
public String getPricePercentage()
A percentage of the price represented as a number in decimal notation
(For example, "5.4"
). Can only be set if all other fields are not
set.
optional string price_percentage = 3;
Returns | |
---|---|
Type | Description |
String |
The pricePercentage. |
getPricePercentageBytes()
public ByteString getPricePercentageBytes()
A percentage of the price represented as a number in decimal notation
(For example, "5.4"
). Can only be set if all other fields are not
set.
optional string price_percentage = 3;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for pricePercentage. |
getSubtable()
public String getSubtable()
The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set.
optional string subtable = 5;
Returns | |
---|---|
Type | Description |
String |
The subtable. |
getSubtableBytes()
public ByteString getSubtableBytes()
The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set.
optional string subtable = 5;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for subtable. |
hasCarrierRate()
public boolean hasCarrierRate()
The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
optional string carrier_rate = 4;
Returns | |
---|---|
Type | Description |
boolean |
Whether the carrierRate field is set. |
hasFlatRate()
public boolean hasFlatRate()
A flat rate. Can only be set if all other fields are not set.
optional .google.shopping.type.Price flat_rate = 2;
Returns | |
---|---|
Type | Description |
boolean |
Whether the flatRate field is set. |
hasNoShipping()
public boolean hasNoShipping()
If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set.
optional bool no_shipping = 1;
Returns | |
---|---|
Type | Description |
boolean |
Whether the noShipping field is set. |
hasPricePercentage()
public boolean hasPricePercentage()
A percentage of the price represented as a number in decimal notation
(For example, "5.4"
). Can only be set if all other fields are not
set.
optional string price_percentage = 3;
Returns | |
---|---|
Type | Description |
boolean |
Whether the pricePercentage field is set. |
hasSubtable()
public boolean hasSubtable()
The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set.
optional string subtable = 5;
Returns | |
---|---|
Type | Description |
boolean |
Whether the subtable field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFlatRate(Price value)
public Value.Builder mergeFlatRate(Price value)
A flat rate. Can only be set if all other fields are not set.
optional .google.shopping.type.Price flat_rate = 2;
Parameter | |
---|---|
Name | Description |
value |
com.google.shopping.type.Price |
Returns | |
---|---|
Type | Description |
Value.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Value.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Value.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Value.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
Value.Builder |
mergeFrom(Value other)
public Value.Builder mergeFrom(Value other)
Parameter | |
---|---|
Name | Description |
other |
Value |
Returns | |
---|---|
Type | Description |
Value.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Value.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Value.Builder |
setCarrierRate(String value)
public Value.Builder setCarrierRate(String value)
The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
optional string carrier_rate = 4;
Parameter | |
---|---|
Name | Description |
value |
String The carrierRate to set. |
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
setCarrierRateBytes(ByteString value)
public Value.Builder setCarrierRateBytes(ByteString value)
The name of a carrier rate referring to a carrier rate defined in the same rate group. Can only be set if all other fields are not set.
optional string carrier_rate = 4;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for carrierRate to set. |
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Value.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Value.Builder |
setFlatRate(Price value)
public Value.Builder setFlatRate(Price value)
A flat rate. Can only be set if all other fields are not set.
optional .google.shopping.type.Price flat_rate = 2;
Parameter | |
---|---|
Name | Description |
value |
com.google.shopping.type.Price |
Returns | |
---|---|
Type | Description |
Value.Builder |
setFlatRate(Price.Builder builderForValue)
public Value.Builder setFlatRate(Price.Builder builderForValue)
A flat rate. Can only be set if all other fields are not set.
optional .google.shopping.type.Price flat_rate = 2;
Parameter | |
---|---|
Name | Description |
builderForValue |
com.google.shopping.type.Price.Builder |
Returns | |
---|---|
Type | Description |
Value.Builder |
setNoShipping(boolean value)
public Value.Builder setNoShipping(boolean value)
If true, then the product can't be shipped. Must be true when set, can only be set if all other fields are not set.
optional bool no_shipping = 1;
Parameter | |
---|---|
Name | Description |
value |
boolean The noShipping to set. |
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
setPricePercentage(String value)
public Value.Builder setPricePercentage(String value)
A percentage of the price represented as a number in decimal notation
(For example, "5.4"
). Can only be set if all other fields are not
set.
optional string price_percentage = 3;
Parameter | |
---|---|
Name | Description |
value |
String The pricePercentage to set. |
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
setPricePercentageBytes(ByteString value)
public Value.Builder setPricePercentageBytes(ByteString value)
A percentage of the price represented as a number in decimal notation
(For example, "5.4"
). Can only be set if all other fields are not
set.
optional string price_percentage = 3;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for pricePercentage to set. |
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Value.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
Value.Builder |
setSubtable(String value)
public Value.Builder setSubtable(String value)
The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set.
optional string subtable = 5;
Parameter | |
---|---|
Name | Description |
value |
String The subtable to set. |
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
setSubtableBytes(ByteString value)
public Value.Builder setSubtableBytes(ByteString value)
The name of a subtable. Can only be set in table cells (For example, not for single values), and only if all other fields are not set.
optional string subtable = 5;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for subtable to set. |
Returns | |
---|---|
Type | Description |
Value.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Value.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Value.Builder |