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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.Returns the value of thecomponentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.language()Returns the value of thelanguagerecord component.name()Returns the value of thenamerecord component.Returns the value of thepreviousCategoryrecord component.status()Returns the value of thestatusrecord component.final StringtoString()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 aTemplaterecord class.- Parameters:
components- the value for thecomponentsrecord componentname- the value for thenamerecord componentlanguage- the value for thelanguagerecord componentid- the value for theidrecord componentcategory- the value for thecategoryrecord componentpreviousCategory- the value for thepreviousCategoryrecord componentstatus- the value for thestatusrecord 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 thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
previousCategory
Returns the value of thepreviousCategoryrecord component.- Returns:
- the value of the
previousCategoryrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-