Package dev.tripswitch.admin
Record Class Router
java.lang.Object
java.lang.Record
dev.tripswitch.admin.Router
public record Router(String id, String name, RouterMode mode, boolean enabled, int breakerCount, List<Breaker> breakers, Instant insertedAt, String createdBy, Map<String,String> metadata)
extends Record
A router configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebreakerCountrecord component.breakers()Returns the value of thebreakersrecord component.Returns the value of thecreatedByrecord component.booleanenabled()Returns the value of theenabledrecord 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.Returns the value of theinsertedAtrecord component.metadata()Returns the value of themetadatarecord component.mode()Returns the value of themoderecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Router
public Router(String id, String name, RouterMode mode, boolean enabled, int breakerCount, List<Breaker> breakers, Instant insertedAt, String createdBy, Map<String, String> metadata) Creates an instance of aRouterrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentmode- the value for themoderecord componentenabled- the value for theenabledrecord componentbreakerCount- the value for thebreakerCountrecord componentbreakers- the value for thebreakersrecord componentinsertedAt- the value for theinsertedAtrecord componentcreatedBy- the value for thecreatedByrecord componentmetadata- the value for themetadatarecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
breakerCount
public int breakerCount()Returns the value of thebreakerCountrecord component.- Returns:
- the value of the
breakerCountrecord component
-
breakers
Returns the value of thebreakersrecord component.- Returns:
- the value of the
breakersrecord component
-
insertedAt
Returns the value of theinsertedAtrecord component.- Returns:
- the value of the
insertedAtrecord component
-
createdBy
Returns the value of thecreatedByrecord component.- Returns:
- the value of the
createdByrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-