Class: Google::Apis::MonitoringV3::TimeInterval
- Inherits:
-
Object
- Object
- Google::Apis::MonitoringV3::TimeInterval
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/monitoring_v3/classes.rb,
generated/google/apis/monitoring_v3/representations.rb,
generated/google/apis/monitoring_v3/representations.rb
Overview
A time interval extending just after a start time through an end time. The start time must not be later than the end time. The default start time is the end time, making the startTime value technically optional. Whether this is useful depends on the MetricKind. If the start and end times are the same, the interval represents a point in time. This is appropriate for GAUGE metrics, but not for DELTA and CUMULATIVE metrics, which cover a span of time.
Instance Attribute Summary collapse
-
#end_time ⇒ String
Required.
-
#start_time ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TimeInterval
constructor
A new instance of TimeInterval.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ TimeInterval
Returns a new instance of TimeInterval
2576 2577 2578 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 2576 def initialize(**args) update!(**args) end |
Instance Attribute Details
#end_time ⇒ String
Required. The end of the time interval.
Corresponds to the JSON property endTime
2568 2569 2570 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 2568 def end_time @end_time end |
#start_time ⇒ String
Optional. The beginning of the time interval. The default value for the start
time is the end time. The start time must not be later than the end time.
Corresponds to the JSON property startTime
2574 2575 2576 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 2574 def start_time @start_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2581 2582 2583 2584 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 2581 def update!(**args) @end_time = args[:end_time] if args.key?(:end_time) @start_time = args[:start_time] if args.key?(:start_time) end |