Record Class Template
java.lang.Object
java.lang.Record
com.whatsapp.api.domain.templates.response.Template
public record Template(List<Component<?>> components, String name, String language, String id, Category category, Category previousCategory, String status)
extends Record
The type Data item.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncategory()
Returns the value of thecategory
record component.Returns the value of thecomponents
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.language()
Returns the value of thelanguage
record component.name()
Returns the value of thename
record component.Returns the value of thepreviousCategory
record component.status()
Returns the value of thestatus
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Template
public Template(List<Component<?>> components, String name, String language, String id, Category category, Category previousCategory, String status) Creates an instance of aTemplate
record class.- Parameters:
components
- the value for thecomponents
record componentname
- the value for thename
record componentlanguage
- the value for thelanguage
record componentid
- the value for theid
record componentcategory
- the value for thecategory
record componentpreviousCategory
- the value for thepreviousCategory
record componentstatus
- the value for thestatus
record component
-
-
Method Details
-
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)
. -
components
Returns the value of thecomponents
record component.- Returns:
- the value of the
components
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
language
Returns the value of thelanguage
record component.- Returns:
- the value of the
language
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
category
Returns the value of thecategory
record component.- Returns:
- the value of the
category
record component
-
previousCategory
Returns the value of thepreviousCategory
record component.- Returns:
- the value of the
previousCategory
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-