Record Class BusinessCatalogEntry

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.business.BusinessCatalogEntry
Record Components:
id - the unique identifier of the catalog entry
encryptedImage - the encrypted URL of the original image of the catalog entry
reviewStatus - the review status of the catalog entry
availability - the availability status of the catalog entry
name - the name of the catalog entry
sellerId - the unique identifier of the seller of the catalog entry
uri - the URI of the catalog entry
description - the description of the catalog entry
price - the price of the catalog entry
currency - the currency of the price of the catalog entry
hidden - whether the catalog entry is hidden or not

public record BusinessCatalogEntry(String id, URI encryptedImage, BusinessReviewStatus reviewStatus, BusinessItemAvailability availability, String name, String sellerId, URI uri, String description, long price, String currency, boolean hidden) extends Record
A record class that represents a business catalog entry.
  • Field Details

    • id

      private final String id
      The field for the id record component.
    • encryptedImage

      private final URI encryptedImage
      The field for the encryptedImage record component.
    • reviewStatus

      private final BusinessReviewStatus reviewStatus
      The field for the reviewStatus record component.
    • availability

      private final BusinessItemAvailability availability
      The field for the availability record component.
    • name

      private final String name
      The field for the name record component.
    • sellerId

      private final String sellerId
      The field for the sellerId record component.
    • uri

      private final URI uri
      The field for the uri record component.
    • description

      private final String description
      The field for the description record component.
    • price

      private final long price
      The field for the price record component.
    • currency

      private final String currency
      The field for the currency record component.
    • hidden

      private final boolean hidden
      The field for the hidden record component.
  • Constructor Details

    • BusinessCatalogEntry

      public BusinessCatalogEntry(String id, URI encryptedImage, BusinessReviewStatus reviewStatus, BusinessItemAvailability availability, String name, String sellerId, URI uri, String description, long price, String currency, boolean hidden)
      Creates an instance of a BusinessCatalogEntry record class.
      Parameters:
      id - the value for the id record component
      encryptedImage - the value for the encryptedImage record component
      reviewStatus - the value for the reviewStatus record component
      availability - the value for the availability record component
      name - the value for the name record component
      sellerId - the value for the sellerId record component
      uri - the value for the uri record component
      description - the value for the description record component
      price - the value for the price record component
      currency - the value for the currency record component
      hidden - the value for the hidden record component
  • Method Details

    • of

      public static BusinessCatalogEntry of(Node node)
      A factory method that creates a BusinessCatalogEntry object from a given Node.
      Parameters:
      node - the node to get the data from
      Returns:
      a BusinessCatalogEntry object
      Throws:
      NoSuchElementException - if some required data is missing
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • encryptedImage

      public URI encryptedImage()
      Returns the value of the encryptedImage record component.
      Returns:
      the value of the encryptedImage record component
    • reviewStatus

      public BusinessReviewStatus reviewStatus()
      Returns the value of the reviewStatus record component.
      Returns:
      the value of the reviewStatus record component
    • availability

      public BusinessItemAvailability availability()
      Returns the value of the availability record component.
      Returns:
      the value of the availability record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • sellerId

      public String sellerId()
      Returns the value of the sellerId record component.
      Returns:
      the value of the sellerId record component
    • uri

      public URI uri()
      Returns the value of the uri record component.
      Returns:
      the value of the uri record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • price

      public long price()
      Returns the value of the price record component.
      Returns:
      the value of the price record component
    • currency

      public String currency()
      Returns the value of the currency record component.
      Returns:
      the value of the currency record component
    • hidden

      public boolean hidden()
      Returns the value of the hidden record component.
      Returns:
      the value of the hidden record component