Record Class DriveState

java.lang.Object
java.lang.Record
de.chiflux.tesla.api.DriveState
Record Components:
gps_as_of - gps_as_of
heading - heading
latitude - latitude
longitude - longitude
power - power
shift_state - shift_state
speed - speed
timestamp - timestamp

public record DriveState(Long gps_as_of, Integer heading, Double latitude, Double longitude, Integer power, String shift_state, Double speed, Long timestamp) extends Record
Dirce state
  • Constructor Details

    • DriveState

      public DriveState(Long gps_as_of, Integer heading, Double latitude, Double longitude, Integer power, String shift_state, Double speed, Long timestamp)
      Creates an instance of a DriveState record class.
      Parameters:
      gps_as_of - the value for the gps_as_of record component
      heading - the value for the heading record component
      latitude - the value for the latitude record component
      longitude - the value for the longitude record component
      power - the value for the power record component
      shift_state - the value for the shift_state record component
      speed - the value for the speed record component
      timestamp - the value for the timestamp record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • gps_as_of

      public Long gps_as_of()
      Returns the value of the gps_as_of record component.
      Returns:
      the value of the gps_as_of record component
    • heading

      public Integer heading()
      Returns the value of the heading record component.
      Returns:
      the value of the heading record component
    • latitude

      public Double latitude()
      Returns the value of the latitude record component.
      Returns:
      the value of the latitude record component
    • longitude

      public Double longitude()
      Returns the value of the longitude record component.
      Returns:
      the value of the longitude record component
    • power

      public Integer power()
      Returns the value of the power record component.
      Returns:
      the value of the power record component
    • shift_state

      public String shift_state()
      Returns the value of the shift_state record component.
      Returns:
      the value of the shift_state record component
    • speed

      public Double speed()
      Returns the value of the speed record component.
      Returns:
      the value of the speed record component
    • timestamp

      public Long timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component