Package com.google.cloud.billing.v1
Class PricingExpression
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.billing.v1.PricingExpression
- All Implemented Interfaces:
PricingExpressionOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class PricingExpression
extends com.google.protobuf.GeneratedMessage
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- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classExpresses a mathematical pricing formula.static final classThe price rate indicating starting usage and its corresponding price.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe base unit for the SKU which is the unit used in usage exports.com.google.protobuf.ByteStringThe base unit for the SKU which is the unit used in usage exports.doubleConversion factor for converting from price per usage_unit to price per base_unit, and start_usage_amount to start_usage_amount in base_unit.The base unit in human readable form.com.google.protobuf.ByteStringThe base unit in human readable form.static PricingExpressionstatic final com.google.protobuf.Descriptors.DescriptordoubleThe recommended quantity of units for displaying pricing info.com.google.protobuf.Parser<PricingExpression>intgetTieredRates(int index) The list of tiered rates for this pricing.intThe list of tiered rates for this pricing.The list of tiered rates for this pricing.getTieredRatesOrBuilder(int index) The list of tiered rates for this pricing.List<? extends PricingExpression.TierRateOrBuilder>The list of tiered rates for this pricing.The short hand for unit of usage this pricing is specified in.com.google.protobuf.ByteStringThe short hand for unit of usage this pricing is specified in.The unit of usage in human readable form.com.google.protobuf.ByteStringThe unit of usage in human readable form.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic PricingExpression.Builderstatic PricingExpression.BuildernewBuilder(PricingExpression prototype) protected PricingExpression.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static PricingExpressionparseDelimitedFrom(InputStream input) static PricingExpressionparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PricingExpressionparseFrom(byte[] data) static PricingExpressionparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PricingExpressionparseFrom(com.google.protobuf.ByteString data) static PricingExpressionparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PricingExpressionparseFrom(com.google.protobuf.CodedInputStream input) static PricingExpressionparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PricingExpressionparseFrom(InputStream input) static PricingExpressionparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PricingExpressionparseFrom(ByteBuffer data) static PricingExpressionparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<PricingExpression>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
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, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
USAGE_UNIT_FIELD_NUMBER
public static final int USAGE_UNIT_FIELD_NUMBER- See Also:
-
DISPLAY_QUANTITY_FIELD_NUMBER
public static final int DISPLAY_QUANTITY_FIELD_NUMBER- See Also:
-
TIERED_RATES_FIELD_NUMBER
public static final int TIERED_RATES_FIELD_NUMBER- See Also:
-
USAGE_UNIT_DESCRIPTION_FIELD_NUMBER
public static final int USAGE_UNIT_DESCRIPTION_FIELD_NUMBER- See Also:
-
BASE_UNIT_FIELD_NUMBER
public static final int BASE_UNIT_FIELD_NUMBER- See Also:
-
BASE_UNIT_DESCRIPTION_FIELD_NUMBER
public static final int BASE_UNIT_DESCRIPTION_FIELD_NUMBER- See Also:
-
BASE_UNIT_CONVERSION_FACTOR_FIELD_NUMBER
public static final int BASE_UNIT_CONVERSION_FACTOR_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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;- Specified by:
getUsageUnitin interfacePricingExpressionOrBuilder- Returns:
- The usageUnit.
-
getUsageUnitBytes
public 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;- Specified by:
getUsageUnitBytesin interfacePricingExpressionOrBuilder- Returns:
- The bytes for usageUnit.
-
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;- Specified by:
getDisplayQuantityin interfacePricingExpressionOrBuilder- Returns:
- The displayQuantity.
-
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;- Specified by:
getTieredRatesListin interfacePricingExpressionOrBuilder
-
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;- Specified by:
getTieredRatesOrBuilderListin interfacePricingExpressionOrBuilder
-
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;- Specified by:
getTieredRatesCountin interfacePricingExpressionOrBuilder
-
getTieredRates
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;- Specified by:
getTieredRatesin interfacePricingExpressionOrBuilder
-
getTieredRatesOrBuilder
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;- Specified by:
getTieredRatesOrBuilderin interfacePricingExpressionOrBuilder
-
getUsageUnitDescription
The unit of usage in human readable form. Example: "gibi byte".
string usage_unit_description = 4;- Specified by:
getUsageUnitDescriptionin interfacePricingExpressionOrBuilder- Returns:
- The usageUnitDescription.
-
getUsageUnitDescriptionBytes
public com.google.protobuf.ByteString getUsageUnitDescriptionBytes()The unit of usage in human readable form. Example: "gibi byte".
string usage_unit_description = 4;- Specified by:
getUsageUnitDescriptionBytesin interfacePricingExpressionOrBuilder- Returns:
- The bytes for usageUnitDescription.
-
getBaseUnit
The base unit for the SKU which is the unit used in usage exports. Example: "By"
string base_unit = 5;- Specified by:
getBaseUnitin interfacePricingExpressionOrBuilder- Returns:
- The baseUnit.
-
getBaseUnitBytes
public 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;- Specified by:
getBaseUnitBytesin interfacePricingExpressionOrBuilder- Returns:
- The bytes for baseUnit.
-
getBaseUnitDescription
The base unit in human readable form. Example: "byte".
string base_unit_description = 6;- Specified by:
getBaseUnitDescriptionin interfacePricingExpressionOrBuilder- Returns:
- The baseUnitDescription.
-
getBaseUnitDescriptionBytes
public com.google.protobuf.ByteString getBaseUnitDescriptionBytes()The base unit in human readable form. Example: "byte".
string base_unit_description = 6;- Specified by:
getBaseUnitDescriptionBytesin interfacePricingExpressionOrBuilder- Returns:
- The bytes for baseUnitDescription.
-
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;- Specified by:
getBaseUnitConversionFactorin interfacePricingExpressionOrBuilder- Returns:
- The baseUnitConversionFactor.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static PricingExpression parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PricingExpression parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PricingExpression parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PricingExpression parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PricingExpression parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PricingExpression parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static PricingExpression parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static PricingExpression parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static PricingExpression parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static PricingExpression parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected PricingExpression.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-