public final class PricingExpression extends com.google.protobuf.GeneratedMessageV3 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| Modifier and Type | Class and Description |
|---|---|
static class |
PricingExpression.Builder
Expresses a mathematical pricing formula.
|
static class |
PricingExpression.TierRate
The price rate indicating starting usage and its corresponding price.
|
static interface |
PricingExpression.TierRateOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
BASE_UNIT_CONVERSION_FACTOR_FIELD_NUMBER |
static int |
BASE_UNIT_DESCRIPTION_FIELD_NUMBER |
static int |
BASE_UNIT_FIELD_NUMBER |
static int |
DISPLAY_QUANTITY_FIELD_NUMBER |
static int |
TIERED_RATES_FIELD_NUMBER |
static int |
USAGE_UNIT_DESCRIPTION_FIELD_NUMBER |
static int |
USAGE_UNIT_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getBaseUnit()
The base unit for the SKU which is the unit used in usage exports.
|
com.google.protobuf.ByteString |
getBaseUnitBytes()
The base unit for the SKU which is the unit used in usage exports.
|
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.
|
String |
getBaseUnitDescription()
The base unit in human readable form.
|
com.google.protobuf.ByteString |
getBaseUnitDescriptionBytes()
The base unit in human readable form.
|
static PricingExpression |
getDefaultInstance() |
PricingExpression |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
double |
getDisplayQuantity()
The recommended quantity of units for displaying pricing info.
|
com.google.protobuf.Parser<PricingExpression> |
getParserForType() |
int |
getSerializedSize() |
PricingExpression.TierRate |
getTieredRates(int index)
The list of tiered rates for this pricing.
|
int |
getTieredRatesCount()
The list of tiered rates for this pricing.
|
List<PricingExpression.TierRate> |
getTieredRatesList()
The list of tiered rates for this pricing.
|
PricingExpression.TierRateOrBuilder |
getTieredRatesOrBuilder(int index)
The list of tiered rates for this pricing.
|
List<? extends PricingExpression.TierRateOrBuilder> |
getTieredRatesOrBuilderList()
The list of tiered rates for this pricing.
|
String |
getUsageUnit()
The short hand for unit of usage this pricing is specified in.
|
com.google.protobuf.ByteString |
getUsageUnitBytes()
The short hand for unit of usage this pricing is specified in.
|
String |
getUsageUnitDescription()
The unit of usage in human readable form.
|
com.google.protobuf.ByteString |
getUsageUnitDescriptionBytes()
The unit of usage in human readable form.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static PricingExpression.Builder |
newBuilder() |
static PricingExpression.Builder |
newBuilder(PricingExpression prototype) |
PricingExpression.Builder |
newBuilderForType() |
protected PricingExpression.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static PricingExpression |
parseDelimitedFrom(InputStream input) |
static PricingExpression |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PricingExpression |
parseFrom(byte[] data) |
static PricingExpression |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PricingExpression |
parseFrom(ByteBuffer data) |
static PricingExpression |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PricingExpression |
parseFrom(com.google.protobuf.ByteString data) |
static PricingExpression |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PricingExpression |
parseFrom(com.google.protobuf.CodedInputStream input) |
static PricingExpression |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PricingExpression |
parseFrom(InputStream input) |
static PricingExpression |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<PricingExpression> |
parser() |
PricingExpression.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int USAGE_UNIT_FIELD_NUMBER
public static final int DISPLAY_QUANTITY_FIELD_NUMBER
public static final int TIERED_RATES_FIELD_NUMBER
public static final int USAGE_UNIT_DESCRIPTION_FIELD_NUMBER
public static final int BASE_UNIT_FIELD_NUMBER
public static final int BASE_UNIT_DESCRIPTION_FIELD_NUMBER
public static final int BASE_UNIT_CONVERSION_FACTOR_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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;getUsageUnit in interface PricingExpressionOrBuilderpublic com.google.protobuf.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;getUsageUnitBytes in interface PricingExpressionOrBuilderpublic 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;getDisplayQuantity in interface PricingExpressionOrBuilderpublic 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;getTieredRatesList in interface PricingExpressionOrBuilderpublic 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;getTieredRatesOrBuilderList in interface PricingExpressionOrBuilderpublic 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;getTieredRatesCount in interface PricingExpressionOrBuilderpublic 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;getTieredRates in interface PricingExpressionOrBuilderpublic 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;getTieredRatesOrBuilder in interface PricingExpressionOrBuilderpublic String getUsageUnitDescription()
The unit of usage in human readable form. Example: "gibi byte".
string usage_unit_description = 4;getUsageUnitDescription in interface PricingExpressionOrBuilderpublic com.google.protobuf.ByteString getUsageUnitDescriptionBytes()
The unit of usage in human readable form. Example: "gibi byte".
string usage_unit_description = 4;getUsageUnitDescriptionBytes in interface PricingExpressionOrBuilderpublic String getBaseUnit()
The base unit for the SKU which is the unit used in usage exports. Example: "By"
string base_unit = 5;getBaseUnit in interface PricingExpressionOrBuilderpublic com.google.protobuf.ByteString getBaseUnitBytes()
The base unit for the SKU which is the unit used in usage exports. Example: "By"
string base_unit = 5;getBaseUnitBytes in interface PricingExpressionOrBuilderpublic String getBaseUnitDescription()
The base unit in human readable form. Example: "byte".
string base_unit_description = 6;getBaseUnitDescription in interface PricingExpressionOrBuilderpublic com.google.protobuf.ByteString getBaseUnitDescriptionBytes()
The base unit in human readable form. Example: "byte".
string base_unit_description = 6;getBaseUnitDescriptionBytes in interface PricingExpressionOrBuilderpublic 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;getBaseUnitConversionFactor in interface PricingExpressionOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static PricingExpression parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PricingExpression parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PricingExpression parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PricingExpression parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PricingExpression parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PricingExpression parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PricingExpression parseFrom(InputStream input) throws IOException
IOExceptionpublic static PricingExpression parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PricingExpression parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static PricingExpression parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PricingExpression parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static PricingExpression parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic PricingExpression.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static PricingExpression.Builder newBuilder()
public static PricingExpression.Builder newBuilder(PricingExpression prototype)
public PricingExpression.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected PricingExpression.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static PricingExpression getDefaultInstance()
public static com.google.protobuf.Parser<PricingExpression> parser()
public com.google.protobuf.Parser<PricingExpression> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public PricingExpression getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.