Class: Google::Apis::HealthV4::SleepStage

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

Sleep stage segment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SleepStage

Returns a new instance of SleepStage.



3697
3698
3699
# File 'lib/google/apis/health_v4/classes.rb', line 3697

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

Instance Attribute Details

#create_timeString

Output only. Creation time of this sleep stages segment. Corresponds to the JSON property createTime

Returns:

  • (String)


3663
3664
3665
# File 'lib/google/apis/health_v4/classes.rb', line 3663

def create_time
  @create_time
end

#end_timeString

Required. Sleep stage end time. Corresponds to the JSON property endTime

Returns:

  • (String)


3668
3669
3670
# File 'lib/google/apis/health_v4/classes.rb', line 3668

def end_time
  @end_time
end

#end_utc_offsetString

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

Returns:

  • (String)


3674
3675
3676
# File 'lib/google/apis/health_v4/classes.rb', line 3674

def end_utc_offset
  @end_utc_offset
end

#start_timeString

Required. Sleep stage start time. Corresponds to the JSON property startTime

Returns:

  • (String)


3679
3680
3681
# File 'lib/google/apis/health_v4/classes.rb', line 3679

def start_time
  @start_time
end

#start_utc_offsetString

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

Returns:

  • (String)


3685
3686
3687
# File 'lib/google/apis/health_v4/classes.rb', line 3685

def start_utc_offset
  @start_utc_offset
end

#typeString

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc. Corresponds to the JSON property type

Returns:

  • (String)


3690
3691
3692
# File 'lib/google/apis/health_v4/classes.rb', line 3690

def type
  @type
end

#update_timeString

Output only. Last update time of this sleep stages segment. Corresponds to the JSON property updateTime

Returns:

  • (String)


3695
3696
3697
# File 'lib/google/apis/health_v4/classes.rb', line 3695

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3702
3703
3704
3705
3706
3707
3708
3709
3710
# File 'lib/google/apis/health_v4/classes.rb', line 3702

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @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)
  @type = args[:type] if args.key?(:type)
  @update_time = args[:update_time] if args.key?(:update_time)
end