Package io.riada.insight.model
Class ImmutableTicket
java.lang.Object
io.riada.insight.model.Ticket
io.riada.insight.model.ImmutableTicket
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableTicket
extends Ticket
Immutable implementation of
Ticket.
Use the builder to create immutable instances:
ImmutableTicket.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTicket.Builderbuilder()Creates a builder forImmutableTicket.static ImmutableTicketCreates an immutable copy of aTicketvalue.created()booleanThis instance is equal to all instances ofImmutableTicketthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,key,reporter,created,updated,ticketStatus,title,type,priority.id()key()priority()reporter()title()toString()Prints the immutable valueTicketwith attribute values.type()updated()final ImmutableTicketwithCreated(Instant value) Copy the current immutable object by setting a value for thecreatedattribute.final ImmutableTicketCopy the current immutable object by setting a value for theidattribute.final ImmutableTicketCopy the current immutable object by setting a value for thekeyattribute.final ImmutableTicketwithPriority(TicketPriority value) Copy the current immutable object by setting a present value for the optionalpriorityattribute.final ImmutableTicketwithPriority(Optional<? extends TicketPriority> optional) Copy the current immutable object by setting an optional value for thepriorityattribute.final ImmutableTicketwithReporter(String value) Copy the current immutable object by setting a present value for the optionalreporterattribute.final ImmutableTicketwithReporter(Optional<String> optional) Copy the current immutable object by setting an optional value for thereporterattribute.final ImmutableTicketwithTicketStatus(TicketStatus value) Copy the current immutable object by setting a present value for the optionalticketStatusattribute.final ImmutableTicketwithTicketStatus(Optional<? extends TicketStatus> optional) Copy the current immutable object by setting an optional value for theticketStatusattribute.final ImmutableTicketCopy the current immutable object by setting a present value for the optionaltitleattribute.final ImmutableTicketCopy the current immutable object by setting an optional value for thetitleattribute.final ImmutableTicketwithType(TicketType value) Copy the current immutable object by setting a present value for the optionaltypeattribute.final ImmutableTicketwithType(Optional<? extends TicketType> optional) Copy the current immutable object by setting an optional value for thetypeattribute.final ImmutableTicketwithUpdated(Instant value) Copy the current immutable object by setting a value for theupdatedattribute.
-
Method Details
-
id
-
key
-
reporter
-
created
-
updated
-
ticketStatus
- Specified by:
ticketStatusin classTicket- Returns:
- The value of the
ticketStatusattribute
-
title
-
type
-
priority
-
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
-
withKey
Copy the current immutable object by setting a value for thekeyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for key- Returns:
- A modified copy of the
thisobject
-
withReporter
Copy the current immutable object by setting a present value for the optionalreporterattribute.- Parameters:
value- The value for reporter- Returns:
- A modified copy of
thisobject
-
withReporter
Copy the current immutable object by setting an optional value for thereporterattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for reporter- Returns:
- A modified copy of
thisobject
-
withCreated
Copy the current immutable object by setting a value for thecreatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created- Returns:
- A modified copy of the
thisobject
-
withUpdated
Copy the current immutable object by setting a value for theupdatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for updated- Returns:
- A modified copy of the
thisobject
-
withTicketStatus
Copy the current immutable object by setting a present value for the optionalticketStatusattribute.- Parameters:
value- The value for ticketStatus- Returns:
- A modified copy of
thisobject
-
withTicketStatus
Copy the current immutable object by setting an optional value for theticketStatusattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for ticketStatus- Returns:
- A modified copy of
thisobject
-
withTitle
Copy the current immutable object by setting a present value for the optionaltitleattribute.- Parameters:
value- The value for title- Returns:
- A modified copy of
thisobject
-
withTitle
Copy the current immutable object by setting an optional value for thetitleattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for title- Returns:
- A modified copy of
thisobject
-
withType
Copy the current immutable object by setting a present value for the optionaltypeattribute.- Parameters:
value- The value for type- Returns:
- A modified copy of
thisobject
-
withType
Copy the current immutable object by setting an optional value for thetypeattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for type- Returns:
- A modified copy of
thisobject
-
withPriority
Copy the current immutable object by setting a present value for the optionalpriorityattribute.- Parameters:
value- The value for priority- Returns:
- A modified copy of
thisobject
-
withPriority
Copy the current immutable object by setting an optional value for thepriorityattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for priority- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableTicketthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,key,reporter,created,updated,ticketStatus,title,type,priority. -
toString
Prints the immutable valueTicketwith attribute values. -
copyOf
Creates an immutable copy of aTicketvalue. 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 Ticket instance
-
builder
Creates a builder forImmutableTicket.ImmutableTicket.builder() .setId(Long) // requiredid.setKey(String) // requiredkey.setReporter(String) // optionalreporter.setCreated(java.time.Instant) // requiredcreated.setUpdated(java.time.Instant) // requiredupdated.setTicketStatus(io.riada.insight.model.TicketStatus) // optionalticketStatus.setTitle(String) // optionaltitle.setType(io.riada.insight.model.TicketType) // optionaltype.setPriority(io.riada.insight.model.TicketPriority) // optionalpriority.build();- Returns:
- A new ImmutableTicket builder
-