Class: Google::Apis::HealthV4::SleepMetadata

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

Additional information about how the sleep was processed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SleepMetadata

Returns a new instance of SleepMetadata.



3712
3713
3714
# File 'lib/google/apis/health_v4/classes.rb', line 3712

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

Instance Attribute Details

#external_idString

Optional. Sleep identifier relevant in the context of the data source. Corresponds to the JSON property externalId

Returns:

  • (String)


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

def external_id
  @external_id
end

#manually_editedBoolean Also known as: manually_edited?

Output only. Some sleeps autodetected by algorithms can be manually edited by users. Corresponds to the JSON property manuallyEdited

Returns:

  • (Boolean)


3692
3693
3694
# File 'lib/google/apis/health_v4/classes.rb', line 3692

def manually_edited
  @manually_edited
end

#napBoolean Also known as: nap?

Output only. Naps are sleeps without stages and relatively short durations. Corresponds to the JSON property nap

Returns:

  • (Boolean)


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

def nap
  @nap
end

#processedBoolean Also known as: processed?

Output only. Sleep and sleep stages algorithms finished processing. Corresponds to the JSON property processed

Returns:

  • (Boolean)


3704
3705
3706
# File 'lib/google/apis/health_v4/classes.rb', line 3704

def processed
  @processed
end

#stages_statusString

Output only. Sleep stages algorithm processing status. Corresponds to the JSON property stagesStatus

Returns:

  • (String)


3710
3711
3712
# File 'lib/google/apis/health_v4/classes.rb', line 3710

def stages_status
  @stages_status
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3717
3718
3719
3720
3721
3722
3723
# File 'lib/google/apis/health_v4/classes.rb', line 3717

def update!(**args)
  @external_id = args[:external_id] if args.key?(:external_id)
  @manually_edited = args[:manually_edited] if args.key?(:manually_edited)
  @nap = args[:nap] if args.key?(:nap)
  @processed = args[:processed] if args.key?(:processed)
  @stages_status = args[:stages_status] if args.key?(:stages_status)
end