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.
public record AdminUpdateUserRequest(String name, String surname, String countryOfOrigin)
extends Record
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
ConstructorsConstructorDescriptionAdminUpdateUserRequest(String name, String surname, String countryOfOrigin) Creates an instance of aAdminUpdateUserRequestrecord class. - 
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecountryOfOriginrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.surname()Returns the value of thesurnamerecord component.final StringtoString()Returns a string representation of this record class. 
- 
Constructor Details
- 
AdminUpdateUserRequest
Creates an instance of aAdminUpdateUserRequestrecord class.- Parameters:
 name- the value for thenamerecord componentsurname- the value for thesurnamerecord componentcountryOfOrigin- the value for thecountryOfOriginrecord 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). - 
name
Returns the value of thenamerecord component.- Returns:
 - the value of the 
namerecord component 
 - 
surname
Returns the value of thesurnamerecord component.- Returns:
 - the value of the 
surnamerecord component 
 - 
countryOfOrigin
Returns the value of thecountryOfOriginrecord component.- Returns:
 - the value of the 
countryOfOriginrecord component 
 
 -