#include <fixed_or_percent.h>
Encapsulates numeric value that can be either absolute or relative.
◆ FixedOrPercent() [1/2]
google_compute_api::FixedOrPercent::FixedOrPercent |
( |
const Json::Value & |
storage | ) |
|
|
explicit |
Standard constructor for an immutable data object instance.
- Parameters
-
[in] | storage | The underlying data storage for this instance. |
◆ FixedOrPercent() [2/2]
google_compute_api::FixedOrPercent::FixedOrPercent |
( |
Json::Value * |
storage | ) |
|
|
explicit |
Standard constructor for a mutable data object instance.
- Parameters
-
[in] | storage | The underlying data storage for this instance. |
◆ ~FixedOrPercent()
google_compute_api::FixedOrPercent::~FixedOrPercent |
( |
| ) |
|
|
virtual |
◆ clear_calculated()
void google_compute_api::FixedOrPercent::clear_calculated |
( |
| ) |
|
|
inline |
Clears the 'calculated
' attribute.
◆ clear_fixed()
void google_compute_api::FixedOrPercent::clear_fixed |
( |
| ) |
|
|
inline |
Clears the 'fixed
' attribute.
◆ clear_percent()
void google_compute_api::FixedOrPercent::clear_percent |
( |
| ) |
|
|
inline |
Clears the 'percent
' attribute.
◆ get_calculated()
int32 google_compute_api::FixedOrPercent::get_calculated |
( |
| ) |
const |
|
inline |
Get the value of the 'calculated
' attribute.
◆ get_fixed()
int32 google_compute_api::FixedOrPercent::get_fixed |
( |
| ) |
const |
|
inline |
Get the value of the 'fixed
' attribute.
◆ get_percent()
int32 google_compute_api::FixedOrPercent::get_percent |
( |
| ) |
const |
|
inline |
Get the value of the 'percent
' attribute.
◆ GetTypeName()
const StringPiece google_compute_api::FixedOrPercent::GetTypeName |
( |
| ) |
const |
|
inline |
◆ has_calculated()
bool google_compute_api::FixedOrPercent::has_calculated |
( |
| ) |
const |
|
inline |
Determine if the 'calculated
' attribute was set.
- Returns
- true if the '
calculated
' attribute was set.
◆ has_fixed()
bool google_compute_api::FixedOrPercent::has_fixed |
( |
| ) |
const |
|
inline |
Determine if the 'fixed
' attribute was set.
- Returns
- true if the '
fixed
' attribute was set.
◆ has_percent()
bool google_compute_api::FixedOrPercent::has_percent |
( |
| ) |
const |
|
inline |
Determine if the 'percent
' attribute was set.
- Returns
- true if the '
percent
' attribute was set.
◆ New()
Creates a new default instance.
- Returns
- Ownership is passed back to the caller.
◆ set_calculated()
void google_compute_api::FixedOrPercent::set_calculated |
( |
int32 |
value | ) |
|
|
inline |
Change the 'calculated
' attribute.
[Output Only] Absolute value of VM instances calculated based on the specific mode.
- If the value is fixed, then the calculated value is equal to the fixed value.
- If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
- Parameters
-
◆ set_fixed()
void google_compute_api::FixedOrPercent::set_fixed |
( |
int32 |
value | ) |
|
|
inline |
Change the 'fixed
' attribute.
Specifies a fixed number of VM instances. This must be a positive integer.
- Parameters
-
◆ set_percent()
void google_compute_api::FixedOrPercent::set_percent |
( |
int32 |
value | ) |
|
|
inline |
Change the 'percent
' attribute.
Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
- Parameters
-
The documentation for this class was generated from the following files: