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 Details

    • UnblockableDomainChange

      public UnblockableDomainChange(UnblockableDomain unblockable, Optional<UnblockableDomain.Reason> newReason)
      Creates an instance of a UnblockableDomainChange record class.
      Parameters:
      unblockable - the value for the unblockable record component
      newReason - the value for the newReason record component
  • Method Details

    • domainName

      public String domainName()
    • newValue

      public UnblockableDomain newValue()
    • isNewOrChange

      public boolean isNewOrChange()
    • isChangeOrDelete

      public boolean isChangeOrDelete()
    • isDelete

      public boolean isDelete()
    • isNew

      public boolean isNew()
    • serialize

      public String serialize()
    • deserialize

      public static UnblockableDomainChange deserialize(String text)
    • createNew

      public static UnblockableDomainChange createNew(UnblockableDomain unblockable)
    • createDeleted

      public static UnblockableDomainChange createDeleted(UnblockableDomain unblockable)
    • createChanged

      public static UnblockableDomainChange createChanged(UnblockableDomain unblockable, UnblockableDomain.Reason newReason)
    • 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.
    • unblockable

      public UnblockableDomain unblockable()
      Returns the value of the unblockable record component.
      Returns:
      the value of the unblockable record component
    • newReason

      public Optional<UnblockableDomain.Reason> newReason()
      Returns the value of the newReason record component.
      Returns:
      the value of the newReason record component