Package google.registry.bsa.api
Record Class UnblockableDomainChange
java.lang.Object
java.lang.Record
google.registry.bsa.api.UnblockableDomainChange
public record UnblockableDomainChange(UnblockableDomain unblockable, Optional<UnblockableDomain.Reason> newReason)
extends Record
Change record of an
UnblockableDomain
.-
Constructor Summary
ConstructorDescriptionUnblockableDomainChange
(UnblockableDomain unblockable, Optional<UnblockableDomain.Reason> newReason) Creates an instance of aUnblockableDomainChange
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic UnblockableDomainChange
createChanged
(UnblockableDomain unblockable, UnblockableDomain.Reason newReason) static UnblockableDomainChange
createDeleted
(UnblockableDomain unblockable) static UnblockableDomainChange
createNew
(UnblockableDomain unblockable) static UnblockableDomainChange
deserialize
(String text) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
boolean
isDelete()
boolean
isNew()
boolean
Returns the value of thenewReason
record component.newValue()
final String
toString()
Returns a string representation of this record class.Returns the value of theunblockable
record component.
-
Constructor Details
-
UnblockableDomainChange
public UnblockableDomainChange(UnblockableDomain unblockable, Optional<UnblockableDomain.Reason> newReason) Creates an instance of aUnblockableDomainChange
record class.- Parameters:
unblockable
- the value for theunblockable
record componentnewReason
- the value for thenewReason
record component
-
-
Method Details
-
domainName
-
newValue
-
isNewOrChange
public boolean isNewOrChange() -
isChangeOrDelete
public boolean isChangeOrDelete() -
isDelete
public boolean isDelete() -
isNew
public boolean isNew() -
serialize
-
deserialize
-
createNew
-
createDeleted
-
createChanged
public static UnblockableDomainChange createChanged(UnblockableDomain unblockable, UnblockableDomain.Reason newReason) -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
unblockable
Returns the value of theunblockable
record component.- Returns:
- the value of the
unblockable
record component
-
newReason
Returns the value of thenewReason
record component.- Returns:
- the value of the
newReason
record component
-