Class: Google::Apis::MonitoringV3::TimeInterval

Inherits:
Object
  • Object
show all
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. If the start time is the same as the end time, then the interval represents a single point in time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TimeInterval

Returns a new instance of TimeInterval



272
273
274
# File 'generated/google/apis/monitoring_v3/classes.rb', line 272

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#end_timeString

Required. The end of the time interval. Corresponds to the JSON property endTime

Returns:

  • (String)


264
265
266
# File 'generated/google/apis/monitoring_v3/classes.rb', line 264

def end_time
  @end_time
end

#start_timeString

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

Returns:

  • (String)


270
271
272
# File 'generated/google/apis/monitoring_v3/classes.rb', line 270

def start_time
  @start_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



277
278
279
280
# File 'generated/google/apis/monitoring_v3/classes.rb', line 277

def update!(**args)
  @end_time = args[:end_time] if args.key?(:end_time)
  @start_time = args[:start_time] if args.key?(:start_time)
end