Class: Google::Apis::ChromemanagementV1::GoogleChromeManagementV1BatterySampleReport

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

Overview

Sampling data for battery.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleChromeManagementV1BatterySampleReport

Returns a new instance of GoogleChromeManagementV1BatterySampleReport.



362
363
364
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 362

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

Instance Attribute Details

#charge_rateFixnum

Output only. Battery charge percentage. Corresponds to the JSON property chargeRate

Returns:

  • (Fixnum)


324
325
326
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 324

def charge_rate
  @charge_rate
end

#currentFixnum

Output only. Battery current (mA). Corresponds to the JSON property current

Returns:

  • (Fixnum)


329
330
331
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 329

def current
  @current
end

#discharge_rateFixnum

Output only. The battery discharge rate measured in mW. Positive if the battery is being discharged, negative if it's being charged. Corresponds to the JSON property dischargeRate

Returns:

  • (Fixnum)


335
336
337
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 335

def discharge_rate
  @discharge_rate
end

#remaining_capacityFixnum

Output only. Battery remaining capacity (mAmpere-hours). Corresponds to the JSON property remainingCapacity

Returns:

  • (Fixnum)


340
341
342
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 340

def remaining_capacity
  @remaining_capacity
end

#report_timeString

Output only. Timestamp of when the sample was collected on device Corresponds to the JSON property reportTime

Returns:

  • (String)


345
346
347
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 345

def report_time
  @report_time
end

#statusString

Output only. Battery status read from sysfs. Example: Discharging Corresponds to the JSON property status

Returns:

  • (String)


350
351
352
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 350

def status
  @status
end

#temperatureFixnum

Output only. Temperature in Celsius degrees. Corresponds to the JSON property temperature

Returns:

  • (Fixnum)


355
356
357
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 355

def temperature
  @temperature
end

#voltageFixnum

Output only. Battery voltage (millivolt). Corresponds to the JSON property voltage

Returns:

  • (Fixnum)


360
361
362
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 360

def voltage
  @voltage
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



367
368
369
370
371
372
373
374
375
376
# File 'lib/google/apis/chromemanagement_v1/classes.rb', line 367

def update!(**args)
  @charge_rate = args[:charge_rate] if args.key?(:charge_rate)
  @current = args[:current] if args.key?(:current)
  @discharge_rate = args[:discharge_rate] if args.key?(:discharge_rate)
  @remaining_capacity = args[:remaining_capacity] if args.key?(:remaining_capacity)
  @report_time = args[:report_time] if args.key?(:report_time)
  @status = args[:status] if args.key?(:status)
  @temperature = args[:temperature] if args.key?(:temperature)
  @voltage = args[:voltage] if args.key?(:voltage)
end