healbesdk / com.healbe.healbesdk.models.healthdata / HDWeightGoal

HDWeightGoal

interface HDWeightGoal : HDEntity

User's goal for losing weight.

There can be a lot of weight goals but only one active at a time.

See Also

GoalPlan

GoalStatus

Properties

addTime

abstract val addTime: Long?

Time when goal was uploaded to the server as timestamp in milliseconds.

changeStatusDate

abstract val changeStatusDate: Timestamp?

Time when goal's status was changed as UNIX Timestamp.

goalDate

abstract val goalDate: Timestamp

The time until which user should reach the goal weight as UNIT Timestamp.

goalWeight

abstract val goalWeight: Double

Weight that user wants to reach in kilograms.

isActive

open val isActive: Boolean

It is true if goal is active (i.e. has status in progress) and false otherwise.

plan

abstract val plan: GoalPlan

Goal's plan. Plan defines how quickly user want to reach goal.

startDate

abstract val startDate: Timestamp

The time when goal was created as UNIX Timestamp.

startWeight

abstract val startWeight: Double

User's weight when goal was created in kilograms.

status

abstract val status: GoalStatus

Status of goal.

userComment

abstract val userComment: String?

User's comment.

Inherited Properties

id

abstract val id: Long?

Unique identifier of entity. It is null until synchronization with the server.

isDeleted

abstract val isDeleted: Boolean

true if this entity has been deleted and false otherwise.

lastUpdate

abstract val lastUpdate: Long?

Timestamp in milliseconds of last changes of this entity on the server.

Functions

isEmpty

open fun isEmpty(): Boolean

Check if object is an empty weight goal.

isSame

open fun isSame(another: HDWeightGoal): Boolean

Returns true if goals are the same (i.e. have the same starting date, goal date, plan, start weight and goal weight) and false otherwise.