Class: Google::Apis::CloudbillingV1beta::UsageRateTimeline
- Inherits:
-
Object
- Object
- Google::Apis::CloudbillingV1beta::UsageRateTimeline
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudbilling_v1beta/classes.rb,
lib/google/apis/cloudbilling_v1beta/representations.rb,
lib/google/apis/cloudbilling_v1beta/representations.rb
Overview
A timeline of usage rates. Consists of a series of entries, each of which
specifies a constant rate of usage during a time interval. Each entry contains
an effective time. The usage rate is in effect from that time until the
effective time of the subsequent entry, or, for the last entry, for the
remaining portion of estimation time frame. Effective times are specified as
an offset into the estimation time frame. Usage is considered to be zero until
the effective_time of the first entry. All subsequent entries must have an
effective time greater than the previous entry and less than the estimate time
frame. The effective time on all entries must be an integer number of hours.
Instance Attribute Summary collapse
-
#unit ⇒ String
The unit for the usage rate in each timeline entry.
-
#usage_rate_timeline_entries ⇒ Array<Google::Apis::CloudbillingV1beta::UsageRateTimelineEntry>
The timeline entries.
Instance Method Summary collapse
-
#initialize(**args) ⇒ UsageRateTimeline
constructor
A new instance of UsageRateTimeline.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ UsageRateTimeline
Returns a new instance of UsageRateTimeline.
974 975 976 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 974 def initialize(**args) update!(**args) end |
Instance Attribute Details
#unit ⇒ String
The unit for the usage rate in each timeline entry. The supported units are a
subset of The Unified Code for Units of Measure
standard: * Time units (TIME-UNIT) * s second * min minute * h hour *
d day * wk week * mo month * yr year * ms millisecond * us
microsecond * ns nanosecond * Basic storage units (BASIC-STORAGE-UNIT) *
bit bit * By byte * Count units (COUNT-UNIT) * count count * **
Prefixes (PREFIX)** * k kilo (10^3) * M mega (10^6) * G giga (10^9) * T
tera (10^12) * P peta (10^15) * Ki kibi (2^10) * Mi mebi (2^20) * Gi
gibi (2^30) * Ti tebi (2^40) * Pi pebi (2^50) Grammar The grammar also
includes these connectors: * / division or ratio (as an infix operator). For
example: kBy/emailor `MiBy/10ms`. * `.` multiplication or composition (as
an infix operator). For example: `GBy.d` or `k`watt`.h`. The grammar for a
unit is as follows:Expression = Component "." Component "/"
Component ; Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] |
Annotation | "1" ; UNIT = TIME-UNIT | STORAGE-UNIT | DATA-UNIT | COUNT-UNIT
Annotation = "" NAME "" ;Examples: * Request per second: `1/s` or
requests/s * GibiBytes: GiBy * GibiBytes * seconds: GiBy.s
Corresponds to the JSON property unit
965 966 967 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 965 def unit @unit end |
#usage_rate_timeline_entries ⇒ Array<Google::Apis::CloudbillingV1beta::UsageRateTimelineEntry>
The timeline entries. Each entry has a start time and usage rate. The start
time specifies the effective time of the usage rate. The entries must be
sorted by start time in an increasing order.
Corresponds to the JSON property usageRateTimelineEntries
972 973 974 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 972 def usage_rate_timeline_entries @usage_rate_timeline_entries end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
979 980 981 982 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 979 def update!(**args) @unit = args[:unit] if args.key?(:unit) @usage_rate_timeline_entries = args[:usage_rate_timeline_entries] if args.key?(:usage_rate_timeline_entries) end |