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.Builder
builder()
Creates a builder forImmutableTicket
.static ImmutableTicket
Creates an immutable copy of aTicket
value.created()
boolean
This instance is equal to all instances ofImmutableTicket
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:id
,key
,reporter
,created
,updated
,ticketStatus
,title
,type
,priority
.id()
key()
priority()
reporter()
title()
toString()
Prints the immutable valueTicket
with attribute values.type()
updated()
final ImmutableTicket
withCreated
(Instant value) Copy the current immutable object by setting a value for thecreated
attribute.final ImmutableTicket
Copy the current immutable object by setting a value for theid
attribute.final ImmutableTicket
Copy the current immutable object by setting a value for thekey
attribute.final ImmutableTicket
withPriority
(TicketPriority value) Copy the current immutable object by setting a present value for the optionalpriority
attribute.final ImmutableTicket
withPriority
(Optional<? extends TicketPriority> optional) Copy the current immutable object by setting an optional value for thepriority
attribute.final ImmutableTicket
withReporter
(String value) Copy the current immutable object by setting a present value for the optionalreporter
attribute.final ImmutableTicket
withReporter
(Optional<String> optional) Copy the current immutable object by setting an optional value for thereporter
attribute.final ImmutableTicket
withTicketStatus
(TicketStatus value) Copy the current immutable object by setting a present value for the optionalticketStatus
attribute.final ImmutableTicket
withTicketStatus
(Optional<? extends TicketStatus> optional) Copy the current immutable object by setting an optional value for theticketStatus
attribute.final ImmutableTicket
Copy the current immutable object by setting a present value for the optionaltitle
attribute.final ImmutableTicket
Copy the current immutable object by setting an optional value for thetitle
attribute.final ImmutableTicket
withType
(TicketType value) Copy the current immutable object by setting a present value for the optionaltype
attribute.final ImmutableTicket
withType
(Optional<? extends TicketType> optional) Copy the current immutable object by setting an optional value for thetype
attribute.final ImmutableTicket
withUpdated
(Instant value) Copy the current immutable object by setting a value for theupdated
attribute.
-
Method Details
-
id
-
key
-
reporter
-
created
-
updated
-
ticketStatus
- Specified by:
ticketStatus
in classTicket
- Returns:
- The value of the
ticketStatus
attribute
-
title
-
type
-
priority
-
withId
Copy the current immutable object by setting a value for theid
attribute. 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
this
object
-
withKey
Copy the current immutable object by setting a value for thekey
attribute. 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
this
object
-
withReporter
Copy the current immutable object by setting a present value for the optionalreporter
attribute.- Parameters:
value
- The value for reporter- Returns:
- A modified copy of
this
object
-
withReporter
Copy the current immutable object by setting an optional value for thereporter
attribute. 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
this
object
-
withCreated
Copy the current immutable object by setting a value for thecreated
attribute. 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
this
object
-
withUpdated
Copy the current immutable object by setting a value for theupdated
attribute. 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
this
object
-
withTicketStatus
Copy the current immutable object by setting a present value for the optionalticketStatus
attribute.- Parameters:
value
- The value for ticketStatus- Returns:
- A modified copy of
this
object
-
withTicketStatus
Copy the current immutable object by setting an optional value for theticketStatus
attribute. 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
this
object
-
withTitle
Copy the current immutable object by setting a present value for the optionaltitle
attribute.- Parameters:
value
- The value for title- Returns:
- A modified copy of
this
object
-
withTitle
Copy the current immutable object by setting an optional value for thetitle
attribute. 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
this
object
-
withType
Copy the current immutable object by setting a present value for the optionaltype
attribute.- Parameters:
value
- The value for type- Returns:
- A modified copy of
this
object
-
withType
Copy the current immutable object by setting an optional value for thetype
attribute. 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
this
object
-
withPriority
Copy the current immutable object by setting a present value for the optionalpriority
attribute.- Parameters:
value
- The value for priority- Returns:
- A modified copy of
this
object
-
withPriority
Copy the current immutable object by setting an optional value for thepriority
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableTicket
that 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 valueTicket
with attribute values. -
copyOf
Creates an immutable copy of aTicket
value. 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) // required
id
.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
-