Package api.mpba.rastvdmy.dto.request
Record Class AdminUpdateUserRequest
java.lang.Object
java.lang.Record
api.mpba.rastvdmy.dto.request.AdminUpdateUserRequest
- Record Components:
surname
- The surname of the user.countryOfOrigin
- The country of origin of the user.
A Data Transfer Object (DTO) that represents a request to update a user's
details by an administrator. This record is used to encapsulate the fields
needed for the update operation, ensuring type safety and immutability.
The following fields are included:
- surname: The surname of the user to be updated.
- countryOfOrigin: The country of origin of the user, represented as a string. This field is serialized to/from JSON with the key "country_of_origin".
-
Constructor Summary
ConstructorDescriptionAdminUpdateUserRequest
(String surname, String countryOfOrigin) Creates an instance of aAdminUpdateUserRequest
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecountryOfOrigin
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.surname()
Returns the value of thesurname
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
AdminUpdateUserRequest
Creates an instance of aAdminUpdateUserRequest
record class.- Parameters:
surname
- the value for thesurname
record componentcountryOfOrigin
- the value for thecountryOfOrigin
record 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)
. -
surname
Returns the value of thesurname
record component.- Returns:
- the value of the
surname
record component
-
countryOfOrigin
Returns the value of thecountryOfOrigin
record component.- Returns:
- the value of the
countryOfOrigin
record component
-