Module it.auties.cobalt
Record Class HighlyStructuredLocalizableParameter
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.template.highlyStructured.HighlyStructuredLocalizableParameter
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject
public record HighlyStructuredLocalizableParameter(String defaultValue, Optional<HighlyStructuredCurrency> parameterCurrency, Optional<HighlyStructuredDateTime> parameterDateTime)
extends Record
implements it.auties.protobuf.model.ProtobufMessage
A model class that represents a time a localizable parameter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thedefaultValuerecord component.private final Optional<HighlyStructuredCurrency> The field for theparameterCurrencyrecord component.private final Optional<HighlyStructuredDateTime> The field for theparameterDateTimerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHighlyStructuredLocalizableParameter(String defaultValue, Optional<HighlyStructuredCurrency> parameterCurrency, Optional<HighlyStructuredDateTime> parameterDateTime) Creates an instance of aHighlyStructuredLocalizableParameterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.of(String defaultValue, HighlyStructuredLocalizableParameterValue parameter) Constructs a new localizable parameter with a default value and a parameterReturns the parameter that this message wrapsReturns the value of theparameterCurrencyrecord component.Returns the value of theparameterDateTimerecord component.Returns the type of parameter that this message wrapsfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
defaultValue
The field for thedefaultValuerecord component. -
parameterCurrency
The field for theparameterCurrencyrecord component. -
parameterDateTime
The field for theparameterDateTimerecord component.
-
-
Constructor Details
-
HighlyStructuredLocalizableParameter
public HighlyStructuredLocalizableParameter(String defaultValue, Optional<HighlyStructuredCurrency> parameterCurrency, Optional<HighlyStructuredDateTime> parameterDateTime) Creates an instance of aHighlyStructuredLocalizableParameterrecord class.- Parameters:
defaultValue- the value for thedefaultValuerecord componentparameterCurrency- the value for theparameterCurrencyrecord componentparameterDateTime- the value for theparameterDateTimerecord component
-
-
Method Details
-
of
public static HighlyStructuredLocalizableParameter of(String defaultValue, HighlyStructuredLocalizableParameterValue parameter) Constructs a new localizable parameter with a default value and a parameter- Parameters:
defaultValue- the default valueparameter- the parameter- Returns:
- a non-null localizable parameter
-
parameterType
Returns the type of parameter that this message wraps- Returns:
- a non-null parameter type
-
parameter
Returns the parameter that this message wraps- Returns:
- a non-null optional
-
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). -
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
parameterCurrency
Returns the value of theparameterCurrencyrecord component.- Returns:
- the value of the
parameterCurrencyrecord component
-
parameterDateTime
Returns the value of theparameterDateTimerecord component.- Returns:
- the value of the
parameterDateTimerecord component
-