Class: Google::Apis::HealthV4::TimeOfDay

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

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TimeOfDay

Returns a new instance of TimeOfDay.



5672
5673
5674
# File 'lib/google/apis/health_v4/classes.rb', line 5672

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

Instance Attribute Details

#hoursFixnum

Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. Corresponds to the JSON property hours

Returns:

  • (Fixnum)


5651
5652
5653
# File 'lib/google/apis/health_v4/classes.rb', line 5651

def hours
  @hours
end

#minutesFixnum

Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59. Corresponds to the JSON property minutes

Returns:

  • (Fixnum)


5657
5658
5659
# File 'lib/google/apis/health_v4/classes.rb', line 5657

def minutes
  @minutes
end

#nanosFixnum

Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. Corresponds to the JSON property nanos

Returns:

  • (Fixnum)


5663
5664
5665
# File 'lib/google/apis/health_v4/classes.rb', line 5663

def nanos
  @nanos
end

#secondsFixnum

Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap- seconds. Corresponds to the JSON property seconds

Returns:

  • (Fixnum)


5670
5671
5672
# File 'lib/google/apis/health_v4/classes.rb', line 5670

def seconds
  @seconds
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5677
5678
5679
5680
5681
5682
# File 'lib/google/apis/health_v4/classes.rb', line 5677

def update!(**args)
  @hours = args[:hours] if args.key?(:hours)
  @minutes = args[:minutes] if args.key?(:minutes)
  @nanos = args[:nanos] if args.key?(:nanos)
  @seconds = args[:seconds] if args.key?(:seconds)
end