Package google.registry.proxy.quota
Record Class QuotaManager.QuotaResponse
java.lang.Object
java.lang.Record
google.registry.proxy.quota.QuotaManager.QuotaResponse
- Enclosing class:
QuotaManager
public static record QuotaManager.QuotaResponse(boolean success, String userId, org.joda.time.DateTime grantedTokenRefillTime)
extends Record
Value class representing a quota response.
-
Constructor Summary
ConstructorDescriptionQuotaResponse
(boolean success, String userId, org.joda.time.DateTime grantedTokenRefillTime) Creates an instance of aQuotaResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.org.joda.time.DateTime
Returns the value of thegrantedTokenRefillTime
record component.final int
hashCode()
Returns a hash code value for this object.boolean
success()
Returns the value of thesuccess
record component.final String
toString()
Returns a string representation of this record class.userId()
Returns the value of theuserId
record component.
-
Constructor Details
-
QuotaResponse
Creates an instance of aQuotaResponse
record class.- Parameters:
success
- the value for thesuccess
record componentuserId
- the value for theuserId
record componentgrantedTokenRefillTime
- the value for thegrantedTokenRefillTime
record component
-
-
Method Details
-
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. -
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. -
equals
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
success
public boolean success()Returns the value of thesuccess
record component.- Returns:
- the value of the
success
record component
-
userId
Returns the value of theuserId
record component.- Returns:
- the value of the
userId
record component
-
grantedTokenRefillTime
public org.joda.time.DateTime grantedTokenRefillTime()Returns the value of thegrantedTokenRefillTime
record component.- Returns:
- the value of the
grantedTokenRefillTime
record component
-