Record Class Moderation.Result.Categories

java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.Moderation.Result.Categories
Enclosing class:
Moderation.Result

public static record Moderation.Result.Categories(boolean hate, boolean hateThreatening, boolean harassment, boolean harassmentThreatening, boolean selfHarm, boolean selfHarmIntent, boolean selfHarmInstructions, boolean sexual, boolean sexualMinors, boolean violence, boolean violenceGraphic) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    Categories(boolean hate, boolean hateThreatening, boolean harassment, boolean harassmentThreatening, boolean selfHarm, boolean selfHarmIntent, boolean selfHarmInstructions, boolean sexual, boolean sexualMinors, boolean violence, boolean violenceGraphic)
    Creates an instance of a Categories record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the harassment record component.
    boolean
    Returns the value of the harassmentThreatening record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the hate record component.
    boolean
    Returns the value of the hateThreatening record component.
    boolean
    Returns the value of the selfHarm record component.
    boolean
    Returns the value of the selfHarmInstructions record component.
    boolean
    Returns the value of the selfHarmIntent record component.
    boolean
    Returns the value of the sexual record component.
    boolean
    Returns the value of the sexualMinors record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the violence record component.
    boolean
    Returns the value of the violenceGraphic record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Categories

      public Categories(boolean hate, boolean hateThreatening, boolean harassment, boolean harassmentThreatening, boolean selfHarm, boolean selfHarmIntent, boolean selfHarmInstructions, boolean sexual, boolean sexualMinors, boolean violence, boolean violenceGraphic)
      Creates an instance of a Categories record class.
      Parameters:
      hate - the value for the hate record component
      hateThreatening - the value for the hateThreatening record component
      harassment - the value for the harassment record component
      harassmentThreatening - the value for the harassmentThreatening record component
      selfHarm - the value for the selfHarm record component
      selfHarmIntent - the value for the selfHarmIntent record component
      selfHarmInstructions - the value for the selfHarmInstructions record component
      sexual - the value for the sexual record component
      sexualMinors - the value for the sexualMinors record component
      violence - the value for the violence record component
      violenceGraphic - the value for the violenceGraphic record component
  • Method Details

    • 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 '=='.
      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.
    • hate

      public boolean hate()
      Returns the value of the hate record component.
      Returns:
      the value of the hate record component
    • hateThreatening

      public boolean hateThreatening()
      Returns the value of the hateThreatening record component.
      Returns:
      the value of the hateThreatening record component
    • harassment

      public boolean harassment()
      Returns the value of the harassment record component.
      Returns:
      the value of the harassment record component
    • harassmentThreatening

      public boolean harassmentThreatening()
      Returns the value of the harassmentThreatening record component.
      Returns:
      the value of the harassmentThreatening record component
    • selfHarm

      public boolean selfHarm()
      Returns the value of the selfHarm record component.
      Returns:
      the value of the selfHarm record component
    • selfHarmIntent

      public boolean selfHarmIntent()
      Returns the value of the selfHarmIntent record component.
      Returns:
      the value of the selfHarmIntent record component
    • selfHarmInstructions

      public boolean selfHarmInstructions()
      Returns the value of the selfHarmInstructions record component.
      Returns:
      the value of the selfHarmInstructions record component
    • sexual

      public boolean sexual()
      Returns the value of the sexual record component.
      Returns:
      the value of the sexual record component
    • sexualMinors

      public boolean sexualMinors()
      Returns the value of the sexualMinors record component.
      Returns:
      the value of the sexualMinors record component
    • violence

      public boolean violence()
      Returns the value of the violence record component.
      Returns:
      the value of the violence record component
    • violenceGraphic

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