Package io.riada.insight.model
Class ImmutableTicketType
java.lang.Object
io.riada.insight.model.TicketType
io.riada.insight.model.ImmutableTicketType
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableTicketType
extends TicketType
Immutable implementation of
TicketType.
Use the builder to create immutable instances:
ImmutableTicketType.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTicketType. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTicketType.Builderbuilder()Creates a builder forImmutableTicketType.static ImmutableTicketTypecopyOf(TicketType instance) Creates an immutable copy of aTicketTypevalue.booleanThis instance is equal to all instances ofImmutableTicketTypethat have equal attribute values.inthashCode()Computes a hash code from attributes:id,name,description,iconUrl.iconUrl()id()name()toString()Prints the immutable valueTicketTypewith attribute values.final ImmutableTicketTypewithDescription(String value) Copy the current immutable object by setting a present value for the optionaldescriptionattribute.final ImmutableTicketTypewithDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescriptionattribute.final ImmutableTicketTypewithIconUrl(String value) Copy the current immutable object by setting a present value for the optionaliconUrlattribute.final ImmutableTicketTypewithIconUrl(Optional<String> optional) Copy the current immutable object by setting an optional value for theiconUrlattribute.final ImmutableTicketTypeCopy the current immutable object by setting a value for theidattribute.final ImmutableTicketTypeCopy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
id
- Specified by:
idin classTicketType- Returns:
- The value of the
idattribute
-
name
- Specified by:
namein classTicketType- Returns:
- The value of the
nameattribute
-
description
- Specified by:
descriptionin classTicketType- Returns:
- The value of the
descriptionattribute
-
iconUrl
- Specified by:
iconUrlin classTicketType- Returns:
- The value of the
iconUrlattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withDescription
Copy the current immutable object by setting a present value for the optionaldescriptionattribute.- Parameters:
value- The value for description- Returns:
- A modified copy of
thisobject
-
withDescription
Copy the current immutable object by setting an optional value for thedescriptionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for description- Returns:
- A modified copy of
thisobject
-
withIconUrl
Copy the current immutable object by setting a present value for the optionaliconUrlattribute.- Parameters:
value- The value for iconUrl- Returns:
- A modified copy of
thisobject
-
withIconUrl
Copy the current immutable object by setting an optional value for theiconUrlattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for iconUrl- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableTicketTypethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name,description,iconUrl. -
toString
Prints the immutable valueTicketTypewith attribute values. -
copyOf
Creates an immutable copy of aTicketTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable TicketType instance
-
builder
Creates a builder forImmutableTicketType.ImmutableTicketType.builder() .setId(String) // requiredid.setName(String) // requiredname.setDescription(String) // optionaldescription.setIconUrl(String) // optionaliconUrl.build();- Returns:
- A new ImmutableTicketType builder
-