Record Class StorageBinRequest
java.lang.Object
java.lang.Record
com.v1rex.liftnexus.storagebin.dto.StorageBinRequest
public record StorageBinRequest(@NotNull(message="Bin code is required") String binCode, @NotNull(message="Coordinates are required") @Valid CoordinateDto coordinate, @NotNull(message="Zone type is required") ZoneType zoneType, @NotNull(message="Max weight capacity is required") @Min(value=0L,message="Weight capacity cannot be negative") Integer maxWeightCapacityKg)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionStorageBinRequest(@NotNull(message="Bin code is required") String binCode, @NotNull(message="Coordinates are required") @Valid CoordinateDto coordinate, @NotNull(message="Zone type is required") ZoneType zoneType, @NotNull(message="Max weight capacity is required") @Min(value=0L,message="Weight capacity cannot be negative") Integer maxWeightCapacityKg) Creates an instance of aStorageBinRequestrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull(message="Bin code is required") StringbinCode()Returns the value of thebinCoderecord component.@NotNull(message="Coordinates are required") @Valid CoordinateDtoReturns the value of thecoordinaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull(message="Max weight capacity is required") @Min(value=0L,message="Weight capacity cannot be negative") IntegerReturns the value of themaxWeightCapacityKgrecord component.final StringtoString()Returns a string representation of this record class.@NotNull(message="Zone type is required") ZoneTypezoneType()Returns the value of thezoneTyperecord component.
-
Constructor Details
-
StorageBinRequest
public StorageBinRequest(@NotNull(message="Bin code is required") @NotNull(message="Bin code is required") String binCode, @NotNull(message="Coordinates are required") @Valid @NotNull(message="Coordinates are required") @Valid CoordinateDto coordinate, @NotNull(message="Zone type is required") @NotNull(message="Zone type is required") ZoneType zoneType, @NotNull(message="Max weight capacity is required") @Min(value=0L,message="Weight capacity cannot be negative") @NotNull(message="Max weight capacity is required") @Min(value=0L,message="Weight capacity cannot be negative") Integer maxWeightCapacityKg) Creates an instance of aStorageBinRequestrecord class.- Parameters:
binCode- the value for thebinCoderecord componentcoordinate- the value for thecoordinaterecord componentzoneType- the value for thezoneTyperecord componentmaxWeightCapacityKg- the value for themaxWeightCapacityKgrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
binCode
@NotNull(message="Bin code is required") public @NotNull(message="Bin code is required") String binCode()Returns the value of thebinCoderecord component.- Returns:
- the value of the
binCoderecord component
-
coordinate
@NotNull(message="Coordinates are required") @Valid public @NotNull(message="Coordinates are required") @Valid CoordinateDto coordinate()Returns the value of thecoordinaterecord component.- Returns:
- the value of the
coordinaterecord component
-
zoneType
@NotNull(message="Zone type is required") public @NotNull(message="Zone type is required") ZoneType zoneType()Returns the value of thezoneTyperecord component.- Returns:
- the value of the
zoneTyperecord component
-
maxWeightCapacityKg
@NotNull(message="Max weight capacity is required") @Min(value=0L, message="Weight capacity cannot be negative") public @NotNull(message="Max weight capacity is required") @Min(value=0L,message="Weight capacity cannot be negative") Integer maxWeightCapacityKg()Returns the value of themaxWeightCapacityKgrecord component.- Returns:
- the value of the
maxWeightCapacityKgrecord component
-