public sealed class PricingExpression : IMessage<PricingExpression>, IEquatable<PricingExpression>, IDeepCloneable<PricingExpression>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Billing v1 API class PricingExpression.
Expresses a mathematical pricing formula. For Example:-
public double BaseUnitConversionFactor { get; set; }
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.
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"
public RepeatedField<PricingExpression.Types.TierRate> TieredRates { get; }
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003ePricingExpression\u003c/code\u003e class within the Google Cloud Billing v1 API, which is used to define mathematical pricing formulas.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePricingExpression\u003c/code\u003e class allows for tiered pricing structures, demonstrated by the provided example where different rates apply based on usage thresholds, for example, tiered rates with different costs for different amounts of data used.\u003c/p\u003e\n"],["\u003cp\u003eSeveral versions of this class are available, ranging from version 2.2.0 up to the latest version, 3.9.0, with links provided to each version's specific documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe class defines several properties, including \u003ccode\u003eBaseUnit\u003c/code\u003e, \u003ccode\u003eBaseUnitConversionFactor\u003c/code\u003e, \u003ccode\u003eTieredRates\u003c/code\u003e, and \u003ccode\u003eUsageUnit\u003c/code\u003e, to precisely specify how pricing is calculated and displayed.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements several interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e for use with the .Net framework, along with implementing the inheritance of the object class.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Billing v1 API - Class PricingExpression (3.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.Billing.V1/latest/Google.Cloud.Billing.V1.PricingExpression)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/3.8.0/Google.Cloud.Billing.V1.PricingExpression)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/3.7.0/Google.Cloud.Billing.V1.PricingExpression)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/3.6.0/Google.Cloud.Billing.V1.PricingExpression)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/3.5.0/Google.Cloud.Billing.V1.PricingExpression)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/3.4.0/Google.Cloud.Billing.V1.PricingExpression)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/3.3.0/Google.Cloud.Billing.V1.PricingExpression)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/3.2.0/Google.Cloud.Billing.V1.PricingExpression)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/3.1.0/Google.Cloud.Billing.V1.PricingExpression)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/3.0.0/Google.Cloud.Billing.V1.PricingExpression)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/2.3.0/Google.Cloud.Billing.V1.PricingExpression)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Billing.V1/2.2.0/Google.Cloud.Billing.V1.PricingExpression) \n\n public sealed class PricingExpression : IMessage\u003cPricingExpression\u003e, IEquatable\u003cPricingExpression\u003e, IDeepCloneable\u003cPricingExpression\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Billing v1 API class PricingExpression.\n\nExpresses a mathematical pricing formula. For Example:-\n\n`usage_unit: GBy`\n`tiered_rates:`\n`[start_usage_amount: 20, unit_price: $10]`\n`[start_usage_amount: 100, unit_price: $5]`\n\nThe above expresses a pricing formula where the first 20GB is free, the\nnext 80GB is priced at $10 per GB followed by $5 per GB for additional\nusage. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PricingExpression \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PricingExpression](/dotnet/docs/reference/Google.Cloud.Billing.V1/latest/Google.Cloud.Billing.V1.PricingExpression), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PricingExpression](/dotnet/docs/reference/Google.Cloud.Billing.V1/latest/Google.Cloud.Billing.V1.PricingExpression), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PricingExpression](/dotnet/docs/reference/Google.Cloud.Billing.V1/latest/Google.Cloud.Billing.V1.PricingExpression), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Billing.V1](/dotnet/docs/reference/Google.Cloud.Billing.V1/latest/Google.Cloud.Billing.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Billing.V1.dll\n\nConstructors\n------------\n\n### PricingExpression()\n\n public PricingExpression()\n\n### PricingExpression(PricingExpression)\n\n public PricingExpression(PricingExpression other)\n\nProperties\n----------\n\n### BaseUnit\n\n public string BaseUnit { get; set; }\n\nThe base unit for the SKU which is the unit used in usage exports.\nExample: \"By\"\n\n### BaseUnitConversionFactor\n\n public double BaseUnitConversionFactor { get; set; }\n\nConversion factor for converting from price per usage_unit to price per\nbase_unit, and start_usage_amount to start_usage_amount in base_unit.\nunit_price / base_unit_conversion_factor = price per base_unit.\nstart_usage_amount \\* base_unit_conversion_factor = start_usage_amount in\nbase_unit.\n\n### BaseUnitDescription\n\n public string BaseUnitDescription { get; set; }\n\nThe base unit in human readable form.\nExample: \"byte\".\n\n### DisplayQuantity\n\n public double DisplayQuantity { get; set; }\n\nThe recommended quantity of units for displaying pricing info. When\ndisplaying pricing info it is recommended to display:\n(unit_price \\* display_quantity) per display_quantity usage_unit.\nThis field does not affect the pricing formula and is for display purposes\nonly.\nExample: If the unit_price is \"0.0001 USD\", the usage_unit is \"GB\" and\nthe display_quantity is \"1000\" then the recommended way of displaying the\npricing info is \"0.10 USD per 1000 GB\"\n\n### TieredRates\n\n public RepeatedField\u003cPricingExpression.Types.TierRate\u003e TieredRates { get; }\n\nThe list of tiered rates for this pricing. The total cost is computed by\napplying each of the tiered rates on usage. This repeated list is sorted\nby ascending order of start_usage_amount.\n\n### UsageUnit\n\n public string UsageUnit { get; set; }\n\nThe short hand for unit of usage this pricing is specified in.\nExample: usage_unit of \"GiBy\" means that usage is specified in \"Gibi Byte\".\n\n### UsageUnitDescription\n\n public string UsageUnitDescription { get; set; }\n\nThe unit of usage in human readable form.\nExample: \"gibi byte\"."]]