Package io.mateu.dtos

Record Class ButtonDto

java.lang.Object
java.lang.Record
io.mateu.dtos.ButtonDto
All Implemented Interfaces:
ComponentMetadataDto

public record ButtonDto(String label, String iconOnLeft, String iconOnRight, String image, ButtonColorDto color, ButtonVariantDto variant, ButtonStyleDto buttonStyle, ButtonSizeDto size, boolean autofocus, boolean disabled, String actionId, Object parameters) extends Record implements ComponentMetadataDto
A button
  • Constructor Details

    • ButtonDto

      public ButtonDto(String label, String iconOnLeft, String iconOnRight, String image, ButtonColorDto color, ButtonVariantDto variant, ButtonStyleDto buttonStyle, ButtonSizeDto size, boolean autofocus, boolean disabled, String actionId, Object parameters)
      Creates an instance of a ButtonDto record class.
      Parameters:
      label - the value for the label record component
      iconOnLeft - the value for the iconOnLeft record component
      iconOnRight - the value for the iconOnRight record component
      image - the value for the image record component
      color - the value for the color record component
      variant - the value for the variant record component
      buttonStyle - the value for the buttonStyle record component
      size - the value for the size record component
      autofocus - the value for the autofocus record component
      disabled - the value for the disabled record component
      actionId - the value for the actionId record component
      parameters - the value for the parameters 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. 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.
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • iconOnLeft

      public String iconOnLeft()
      Returns the value of the iconOnLeft record component.
      Returns:
      the value of the iconOnLeft record component
    • iconOnRight

      public String iconOnRight()
      Returns the value of the iconOnRight record component.
      Returns:
      the value of the iconOnRight record component
    • image

      public String image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component
    • color

      public ButtonColorDto color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • variant

      public ButtonVariantDto variant()
      Returns the value of the variant record component.
      Returns:
      the value of the variant record component
    • buttonStyle

      public ButtonStyleDto buttonStyle()
      Returns the value of the buttonStyle record component.
      Returns:
      the value of the buttonStyle record component
    • size

      public ButtonSizeDto size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • autofocus

      public boolean autofocus()
      Returns the value of the autofocus record component.
      Returns:
      the value of the autofocus record component
    • disabled

      public boolean disabled()
      Returns the value of the disabled record component.
      Returns:
      the value of the disabled record component
    • actionId

      public String actionId()
      Returns the value of the actionId record component.
      Returns:
      the value of the actionId record component
    • parameters

      public Object parameters()
      Returns the value of the parameters record component.
      Returns:
      the value of the parameters record component