- 2.53.0 (latest)
- 2.52.0
- 2.51.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.5
- 2.2.1
- 2.1.12
public static final class PricingExpression.Builder extends GeneratedMessageV3.Builder<PricingExpression.Builder> implements PricingExpressionOrBuilder
Expresses a mathematical pricing formula. For Example:-
usage_unit: GBy
tiered_rates:
[start_usage_amount: 20, unit_price: $10]
[start_usage_amount: 100, unit_price: $5]
The above expresses a pricing formula where the first 20GB is free, the next 80GB is priced at $10 per GB followed by $5 per GB for additional usage.
Protobuf type google.cloud.billing.v1.PricingExpression
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > PricingExpression.BuilderImplements
PricingExpressionOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllTieredRates(Iterable<? extends PricingExpression.TierRate> values)
public PricingExpression.Builder addAllTieredRates(Iterable<? extends PricingExpression.TierRate> values)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameter | |
---|---|
Name | Description |
values | Iterable<? extends com.google.cloud.billing.v1.PricingExpression.TierRate> |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PricingExpression.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
addTieredRates(PricingExpression.TierRate value)
public PricingExpression.Builder addTieredRates(PricingExpression.TierRate value)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameter | |
---|---|
Name | Description |
value | PricingExpression.TierRate |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
addTieredRates(PricingExpression.TierRate.Builder builderForValue)
public PricingExpression.Builder addTieredRates(PricingExpression.TierRate.Builder builderForValue)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameter | |
---|---|
Name | Description |
builderForValue | PricingExpression.TierRate.Builder |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
addTieredRates(int index, PricingExpression.TierRate value)
public PricingExpression.Builder addTieredRates(int index, PricingExpression.TierRate value)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameters | |
---|---|
Name | Description |
index | int |
value | PricingExpression.TierRate |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
addTieredRates(int index, PricingExpression.TierRate.Builder builderForValue)
public PricingExpression.Builder addTieredRates(int index, PricingExpression.TierRate.Builder builderForValue)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | PricingExpression.TierRate.Builder |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
addTieredRatesBuilder()
public PricingExpression.TierRate.Builder addTieredRatesBuilder()
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Returns | |
---|---|
Type | Description |
PricingExpression.TierRate.Builder |
addTieredRatesBuilder(int index)
public PricingExpression.TierRate.Builder addTieredRatesBuilder(int index)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
PricingExpression.TierRate.Builder |
build()
public PricingExpression build()
Returns | |
---|---|
Type | Description |
PricingExpression |
buildPartial()
public PricingExpression buildPartial()
Returns | |
---|---|
Type | Description |
PricingExpression |
clear()
public PricingExpression.Builder clear()
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
clearBaseUnit()
public PricingExpression.Builder clearBaseUnit()
The base unit for the SKU which is the unit used in usage exports. Example: "By"
string base_unit = 5;
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
clearBaseUnitConversionFactor()
public PricingExpression.Builder clearBaseUnitConversionFactor()
Conversion factor for converting from price per usage_unit to price per base_unit, and start_usage_amount to start_usage_amount in base_unit. unit_price / base_unit_conversion_factor = price per base_unit. start_usage_amount * base_unit_conversion_factor = start_usage_amount in base_unit.
double base_unit_conversion_factor = 7;
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
clearBaseUnitDescription()
public PricingExpression.Builder clearBaseUnitDescription()
The base unit in human readable form. Example: "byte".
string base_unit_description = 6;
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
clearDisplayQuantity()
public PricingExpression.Builder clearDisplayQuantity()
The recommended quantity of units for displaying pricing info. When displaying pricing info it is recommended to display: (unit_price * display_quantity) per display_quantity usage_unit. This field does not affect the pricing formula and is for display purposes only. Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and the display_quantity is "1000" then the recommended way of displaying the pricing info is "0.10 USD per 1000 GB"
double display_quantity = 2;
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public PricingExpression.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public PricingExpression.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
clearTieredRates()
public PricingExpression.Builder clearTieredRates()
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
clearUsageUnit()
public PricingExpression.Builder clearUsageUnit()
The short hand for unit of usage this pricing is specified in. Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".
string usage_unit = 1;
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
clearUsageUnitDescription()
public PricingExpression.Builder clearUsageUnitDescription()
The unit of usage in human readable form. Example: "gibi byte".
string usage_unit_description = 4;
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
clone()
public PricingExpression.Builder clone()
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
getBaseUnit()
public String getBaseUnit()
The base unit for the SKU which is the unit used in usage exports. Example: "By"
string base_unit = 5;
Returns | |
---|---|
Type | Description |
String | The baseUnit. |
getBaseUnitBytes()
public ByteString getBaseUnitBytes()
The base unit for the SKU which is the unit used in usage exports. Example: "By"
string base_unit = 5;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for baseUnit. |
getBaseUnitConversionFactor()
public double getBaseUnitConversionFactor()
Conversion factor for converting from price per usage_unit to price per base_unit, and start_usage_amount to start_usage_amount in base_unit. unit_price / base_unit_conversion_factor = price per base_unit. start_usage_amount * base_unit_conversion_factor = start_usage_amount in base_unit.
double base_unit_conversion_factor = 7;
Returns | |
---|---|
Type | Description |
double | The baseUnitConversionFactor. |
getBaseUnitDescription()
public String getBaseUnitDescription()
The base unit in human readable form. Example: "byte".
string base_unit_description = 6;
Returns | |
---|---|
Type | Description |
String | The baseUnitDescription. |
getBaseUnitDescriptionBytes()
public ByteString getBaseUnitDescriptionBytes()
The base unit in human readable form. Example: "byte".
string base_unit_description = 6;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for baseUnitDescription. |
getDefaultInstanceForType()
public PricingExpression getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
PricingExpression |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getDisplayQuantity()
public double getDisplayQuantity()
The recommended quantity of units for displaying pricing info. When displaying pricing info it is recommended to display: (unit_price * display_quantity) per display_quantity usage_unit. This field does not affect the pricing formula and is for display purposes only. Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and the display_quantity is "1000" then the recommended way of displaying the pricing info is "0.10 USD per 1000 GB"
double display_quantity = 2;
Returns | |
---|---|
Type | Description |
double | The displayQuantity. |
getTieredRates(int index)
public PricingExpression.TierRate getTieredRates(int index)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
PricingExpression.TierRate |
getTieredRatesBuilder(int index)
public PricingExpression.TierRate.Builder getTieredRatesBuilder(int index)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
PricingExpression.TierRate.Builder |
getTieredRatesBuilderList()
public List<PricingExpression.TierRate.Builder> getTieredRatesBuilderList()
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Returns | |
---|---|
Type | Description |
List<Builder> |
getTieredRatesCount()
public int getTieredRatesCount()
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Returns | |
---|---|
Type | Description |
int |
getTieredRatesList()
public List<PricingExpression.TierRate> getTieredRatesList()
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Returns | |
---|---|
Type | Description |
List<TierRate> |
getTieredRatesOrBuilder(int index)
public PricingExpression.TierRateOrBuilder getTieredRatesOrBuilder(int index)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
PricingExpression.TierRateOrBuilder |
getTieredRatesOrBuilderList()
public List<? extends PricingExpression.TierRateOrBuilder> getTieredRatesOrBuilderList()
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder> |
getUsageUnit()
public String getUsageUnit()
The short hand for unit of usage this pricing is specified in. Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".
string usage_unit = 1;
Returns | |
---|---|
Type | Description |
String | The usageUnit. |
getUsageUnitBytes()
public ByteString getUsageUnitBytes()
The short hand for unit of usage this pricing is specified in. Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".
string usage_unit = 1;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for usageUnit. |
getUsageUnitDescription()
public String getUsageUnitDescription()
The unit of usage in human readable form. Example: "gibi byte".
string usage_unit_description = 4;
Returns | |
---|---|
Type | Description |
String | The usageUnitDescription. |
getUsageUnitDescriptionBytes()
public ByteString getUsageUnitDescriptionBytes()
The unit of usage in human readable form. Example: "gibi byte".
string usage_unit_description = 4;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for usageUnitDescription. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(PricingExpression other)
public PricingExpression.Builder mergeFrom(PricingExpression other)
Parameter | |
---|---|
Name | Description |
other | PricingExpression |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public PricingExpression.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public PricingExpression.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PricingExpression.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
removeTieredRates(int index)
public PricingExpression.Builder removeTieredRates(int index)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
setBaseUnit(String value)
public PricingExpression.Builder setBaseUnit(String value)
The base unit for the SKU which is the unit used in usage exports. Example: "By"
string base_unit = 5;
Parameter | |
---|---|
Name | Description |
value | String The baseUnit to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
setBaseUnitBytes(ByteString value)
public PricingExpression.Builder setBaseUnitBytes(ByteString value)
The base unit for the SKU which is the unit used in usage exports. Example: "By"
string base_unit = 5;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for baseUnit to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
setBaseUnitConversionFactor(double value)
public PricingExpression.Builder setBaseUnitConversionFactor(double value)
Conversion factor for converting from price per usage_unit to price per base_unit, and start_usage_amount to start_usage_amount in base_unit. unit_price / base_unit_conversion_factor = price per base_unit. start_usage_amount * base_unit_conversion_factor = start_usage_amount in base_unit.
double base_unit_conversion_factor = 7;
Parameter | |
---|---|
Name | Description |
value | double The baseUnitConversionFactor to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
setBaseUnitDescription(String value)
public PricingExpression.Builder setBaseUnitDescription(String value)
The base unit in human readable form. Example: "byte".
string base_unit_description = 6;
Parameter | |
---|---|
Name | Description |
value | String The baseUnitDescription to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
setBaseUnitDescriptionBytes(ByteString value)
public PricingExpression.Builder setBaseUnitDescriptionBytes(ByteString value)
The base unit in human readable form. Example: "byte".
string base_unit_description = 6;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for baseUnitDescription to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
setDisplayQuantity(double value)
public PricingExpression.Builder setDisplayQuantity(double value)
The recommended quantity of units for displaying pricing info. When displaying pricing info it is recommended to display: (unit_price * display_quantity) per display_quantity usage_unit. This field does not affect the pricing formula and is for display purposes only. Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and the display_quantity is "1000" then the recommended way of displaying the pricing info is "0.10 USD per 1000 GB"
double display_quantity = 2;
Parameter | |
---|---|
Name | Description |
value | double The displayQuantity to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public PricingExpression.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PricingExpression.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
setTieredRates(int index, PricingExpression.TierRate value)
public PricingExpression.Builder setTieredRates(int index, PricingExpression.TierRate value)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameters | |
---|---|
Name | Description |
index | int |
value | PricingExpression.TierRate |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
setTieredRates(int index, PricingExpression.TierRate.Builder builderForValue)
public PricingExpression.Builder setTieredRates(int index, PricingExpression.TierRate.Builder builderForValue)
The list of tiered rates for this pricing. The total cost is computed by applying each of the tiered rates on usage. This repeated list is sorted by ascending order of start_usage_amount.
repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | PricingExpression.TierRate.Builder |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final PricingExpression.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder |
setUsageUnit(String value)
public PricingExpression.Builder setUsageUnit(String value)
The short hand for unit of usage this pricing is specified in. Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".
string usage_unit = 1;
Parameter | |
---|---|
Name | Description |
value | String The usageUnit to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
setUsageUnitBytes(ByteString value)
public PricingExpression.Builder setUsageUnitBytes(ByteString value)
The short hand for unit of usage this pricing is specified in. Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte".
string usage_unit = 1;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for usageUnit to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
setUsageUnitDescription(String value)
public PricingExpression.Builder setUsageUnitDescription(String value)
The unit of usage in human readable form. Example: "gibi byte".
string usage_unit_description = 4;
Parameter | |
---|---|
Name | Description |
value | String The usageUnitDescription to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |
setUsageUnitDescriptionBytes(ByteString value)
public PricingExpression.Builder setUsageUnitDescriptionBytes(ByteString value)
The unit of usage in human readable form. Example: "gibi byte".
string usage_unit_description = 4;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for usageUnitDescription to set. |
Returns | |
---|---|
Type | Description |
PricingExpression.Builder | This builder for chaining. |