Class: Google::Apis::AndroidmanagementV1::PowerManagementEvent

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

Overview

A power management event.

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) ⇒ PowerManagementEvent

Returns a new instance of PowerManagementEvent.


2990
2991
2992
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 2990

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

Instance Attribute Details

#battery_levelFloat

For BATTERY_LEVEL_COLLECTED events, the battery level as a percentage. Corresponds to the JSON property batteryLevel

Returns:

  • (Float)

2978
2979
2980
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 2978

def battery_level
  @battery_level
end

#create_timeString

The creation time of the event. Corresponds to the JSON property createTime

Returns:

  • (String)

2983
2984
2985
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 2983

def create_time
  @create_time
end

#event_typeString

Event type. Corresponds to the JSON property eventType

Returns:

  • (String)

2988
2989
2990
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 2988

def event_type
  @event_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


2995
2996
2997
2998
2999
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 2995

def update!(**args)
  @battery_level = args[:battery_level] if args.key?(:battery_level)
  @create_time = args[:create_time] if args.key?(:create_time)
  @event_type = args[:event_type] if args.key?(:event_type)
end