Class RateLimit
- java.lang.Object
-
- io.github.jeremylong.openvulnerability.client.ghsa.RateLimit
-
- All Implemented Interfaces:
java.io.Serializable
public class RateLimit extends java.lang.Object implements java.io.SerializableRepresents the client's rate limit.type RateLimit
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RateLimit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)intgetCost()The point cost for the current query counting against the rate limit.intgetLimit()The maximum number of points the client is permitted to consume in a 60-minute window.intgetRemaining()The number of points remaining in the current rate limit window.java.time.ZonedDateTimegetResetAt()The time at which the current rate limit window resets in UTC epoch seconds.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getLimit
public int getLimit()
The maximum number of points the client is permitted to consume in a 60-minute window.- Returns:
- the limit.
-
getCost
public int getCost()
The point cost for the current query counting against the rate limit.- Returns:
- the cost.
-
getRemaining
public int getRemaining()
The number of points remaining in the current rate limit window.- Returns:
- the remaining points.
-
getResetAt
public java.time.ZonedDateTime getResetAt()
The time at which the current rate limit window resets in UTC epoch seconds.- Returns:
- the time the rate limit window will reset.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-