Class: Google::Apis::HealthV4::OutOfBedSegment

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/health_v4/classes.rb,
lib/google/apis/health_v4/representations.rb,
lib/google/apis/health_v4/representations.rb

Overview

A time interval to represent an out-of-bed segment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OutOfBedSegment

Returns a new instance of OutOfBedSegment.



2609
2610
2611
# File 'lib/google/apis/health_v4/classes.rb', line 2609

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

Instance Attribute Details

#end_timeString

Required. Segment end time. Corresponds to the JSON property endTime

Returns:

  • (String)


2590
2591
2592
# File 'lib/google/apis/health_v4/classes.rb', line 2590

def end_time
  @end_time
end

#end_utc_offsetString

Required. The offset of the user's local time at the end of the segment relative to the Coordinated Universal Time (UTC). Corresponds to the JSON property endUtcOffset

Returns:

  • (String)


2596
2597
2598
# File 'lib/google/apis/health_v4/classes.rb', line 2596

def end_utc_offset
  @end_utc_offset
end

#start_timeString

Required. Segment tart time. Corresponds to the JSON property startTime

Returns:

  • (String)


2601
2602
2603
# File 'lib/google/apis/health_v4/classes.rb', line 2601

def start_time
  @start_time
end

#start_utc_offsetString

Required. The offset of the user's local time at the start of the segment relative to the Coordinated Universal Time (UTC). Corresponds to the JSON property startUtcOffset

Returns:

  • (String)


2607
2608
2609
# File 'lib/google/apis/health_v4/classes.rb', line 2607

def start_utc_offset
  @start_utc_offset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2614
2615
2616
2617
2618
2619
# File 'lib/google/apis/health_v4/classes.rb', line 2614

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