cloudbilling  v1
Public Member Functions | Static Public Member Functions | List of all members
google_cloudbilling_api::PricingExpression Class Reference

#include <pricing_expression.h>

Inheritance diagram for google_cloudbilling_api::PricingExpression:

Public Member Functions

 PricingExpression (const Json::Value &storage)
 
 PricingExpression (Json::Value *storage)
 
virtual ~PricingExpression ()
 
const StringPiece GetTypeName () const
 
bool has_base_unit () const
 
void clear_base_unit ()
 
const StringPiece get_base_unit () const
 
void set_base_unit (const StringPiece &value)
 
bool has_base_unit_conversion_factor () const
 
void clear_base_unit_conversion_factor ()
 
double get_base_unit_conversion_factor () const
 
void set_base_unit_conversion_factor (double value)
 
bool has_base_unit_description () const
 
void clear_base_unit_description ()
 
const StringPiece get_base_unit_description () const
 
void set_base_unit_description (const StringPiece &value)
 
bool has_display_quantity () const
 
void clear_display_quantity ()
 
double get_display_quantity () const
 
void set_display_quantity (double value)
 
bool has_tiered_rates () const
 
void clear_tiered_rates ()
 
const client::JsonCppArray< TierRateget_tiered_rates () const
 
client::JsonCppArray< TierRatemutable_tieredRates ()
 
bool has_usage_unit () const
 
void clear_usage_unit ()
 
const StringPiece get_usage_unit () const
 
void set_usage_unit (const StringPiece &value)
 
bool has_usage_unit_description () const
 
void clear_usage_unit_description ()
 
const StringPiece get_usage_unit_description () const
 
void set_usage_unit_description (const StringPiece &value)
 

Static Public Member Functions

static PricingExpressionNew ()
 

Detailed Description

Example:
usage_unit: GBy.
tiered_rates <dd>.
[start_usage_amount <dd>20, unit_price: $10].
[start_usage_amount <dd>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.

Constructor & Destructor Documentation

◆ PricingExpression() [1/2]

google_cloudbilling_api::PricingExpression::PricingExpression ( const Json::Value &  storage)
explicit

Standard constructor for an immutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ PricingExpression() [2/2]

google_cloudbilling_api::PricingExpression::PricingExpression ( Json::Value *  storage)
explicit

Standard constructor for a mutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ ~PricingExpression()

google_cloudbilling_api::PricingExpression::~PricingExpression ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_base_unit()

void google_cloudbilling_api::PricingExpression::clear_base_unit ( )
inline

Clears the 'baseUnit' attribute.

◆ clear_base_unit_conversion_factor()

void google_cloudbilling_api::PricingExpression::clear_base_unit_conversion_factor ( )
inline

Clears the 'baseUnitConversionFactor' attribute.

◆ clear_base_unit_description()

void google_cloudbilling_api::PricingExpression::clear_base_unit_description ( )
inline

Clears the 'baseUnitDescription' attribute.

◆ clear_display_quantity()

void google_cloudbilling_api::PricingExpression::clear_display_quantity ( )
inline

Clears the 'displayQuantity' attribute.

◆ clear_tiered_rates()

void google_cloudbilling_api::PricingExpression::clear_tiered_rates ( )
inline

Clears the 'tieredRates' attribute.

◆ clear_usage_unit()

void google_cloudbilling_api::PricingExpression::clear_usage_unit ( )
inline

Clears the 'usageUnit' attribute.

◆ clear_usage_unit_description()

void google_cloudbilling_api::PricingExpression::clear_usage_unit_description ( )
inline

Clears the 'usageUnitDescription' attribute.

◆ get_base_unit()

const StringPiece google_cloudbilling_api::PricingExpression::get_base_unit ( ) const
inline

Get the value of the 'baseUnit' attribute.

◆ get_base_unit_conversion_factor()

double google_cloudbilling_api::PricingExpression::get_base_unit_conversion_factor ( ) const
inline

Get the value of the 'baseUnitConversionFactor' attribute.

◆ get_base_unit_description()

const StringPiece google_cloudbilling_api::PricingExpression::get_base_unit_description ( ) const
inline

Get the value of the 'baseUnitDescription' attribute.

◆ get_display_quantity()

double google_cloudbilling_api::PricingExpression::get_display_quantity ( ) const
inline

Get the value of the 'displayQuantity' attribute.

◆ get_tiered_rates()

const client::JsonCppArray<TierRate > google_cloudbilling_api::PricingExpression::get_tiered_rates ( ) const

Get a reference to the value of the 'tieredRates' attribute.

◆ get_usage_unit()

const StringPiece google_cloudbilling_api::PricingExpression::get_usage_unit ( ) const
inline

Get the value of the 'usageUnit' attribute.

◆ get_usage_unit_description()

const StringPiece google_cloudbilling_api::PricingExpression::get_usage_unit_description ( ) const
inline

Get the value of the 'usageUnitDescription' attribute.

◆ GetTypeName()

const StringPiece google_cloudbilling_api::PricingExpression::GetTypeName ( ) const
inline

Returns a string denoting the type of this data object.

Returns
google_cloudbilling_api::PricingExpression

◆ has_base_unit()

bool google_cloudbilling_api::PricingExpression::has_base_unit ( ) const
inline

Determine if the 'baseUnit' attribute was set.

Returns
true if the 'baseUnit' attribute was set.

◆ has_base_unit_conversion_factor()

bool google_cloudbilling_api::PricingExpression::has_base_unit_conversion_factor ( ) const
inline

Determine if the 'baseUnitConversionFactor' attribute was set.

Returns
true if the 'baseUnitConversionFactor' attribute was set.

◆ has_base_unit_description()

bool google_cloudbilling_api::PricingExpression::has_base_unit_description ( ) const
inline

Determine if the 'baseUnitDescription' attribute was set.

Returns
true if the 'baseUnitDescription' attribute was set.

◆ has_display_quantity()

bool google_cloudbilling_api::PricingExpression::has_display_quantity ( ) const
inline

Determine if the 'displayQuantity' attribute was set.

Returns
true if the 'displayQuantity' attribute was set.

◆ has_tiered_rates()

bool google_cloudbilling_api::PricingExpression::has_tiered_rates ( ) const
inline

Determine if the 'tieredRates' attribute was set.

Returns
true if the 'tieredRates' attribute was set.

◆ has_usage_unit()

bool google_cloudbilling_api::PricingExpression::has_usage_unit ( ) const
inline

Determine if the 'usageUnit' attribute was set.

Returns
true if the 'usageUnit' attribute was set.

◆ has_usage_unit_description()

bool google_cloudbilling_api::PricingExpression::has_usage_unit_description ( ) const
inline

Determine if the 'usageUnitDescription' attribute was set.

Returns
true if the 'usageUnitDescription' attribute was set.

◆ mutable_tieredRates()

client::JsonCppArray<TierRate > google_cloudbilling_api::PricingExpression::mutable_tieredRates ( )

Gets a reference to a mutable value of the 'tieredRates' property.

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.

Returns
The result can be modified to change the attribute value.

◆ New()

PricingExpression * google_cloudbilling_api::PricingExpression::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_base_unit()

void google_cloudbilling_api::PricingExpression::set_base_unit ( const StringPiece &  value)
inline

Change the 'baseUnit' attribute.

The base unit for the SKU which is the unit used in usage exports. Example: "By".

Parameters
[in]valueThe new value.

◆ set_base_unit_conversion_factor()

void google_cloudbilling_api::PricingExpression::set_base_unit_conversion_factor ( double  value)
inline

Change the 'baseUnitConversionFactor' attribute.

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.

Parameters
[in]valueThe new value.

◆ set_base_unit_description()

void google_cloudbilling_api::PricingExpression::set_base_unit_description ( const StringPiece &  value)
inline

Change the 'baseUnitDescription' attribute.

The base unit in human readable form. Example: "byte".

Parameters
[in]valueThe new value.

◆ set_display_quantity()

void google_cloudbilling_api::PricingExpression::set_display_quantity ( double  value)
inline

Change the 'displayQuantity' attribute.

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".

Parameters
[in]valueThe new value.

◆ set_usage_unit()

void google_cloudbilling_api::PricingExpression::set_usage_unit ( const StringPiece &  value)
inline

Change the 'usageUnit' attribute.

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".

Parameters
[in]valueThe new value.

◆ set_usage_unit_description()

void google_cloudbilling_api::PricingExpression::set_usage_unit_description ( const StringPiece &  value)
inline

Change the 'usageUnitDescription' attribute.

The unit of usage in human readable form. Example: "gibi byte".

Parameters
[in]valueThe new value.

The documentation for this class was generated from the following files: