Package org.localify.city.dto
Class CityPatchRequest
java.lang.Object
org.localify.city.dto.CityPatchRequest
Represents a request to patch a city.
This class uses
Optional to distinguish between a field that was not provided
and a field that was provided with a null or empty value.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the latitude of the city.Gets the longitude of the city.getName()Gets the name of the city.setLatitude(Optional<Double> latitude) Sets the latitude of the city.setLongitude(Optional<Double> longitude) Sets the longitude of the city.Sets the name of the city.
-
Constructor Details
-
CityPatchRequest
public CityPatchRequest()
-
-
Method Details
-
getName
Gets the name of the city.- Returns:
- An
Optionalcontaining the name of the city.
-
setName
Sets the name of the city.- Parameters:
name- AnOptionalcontaining the name of the city.- Returns:
- This CityPatchRequest instance.
-
getLatitude
Gets the latitude of the city.- Returns:
- An
Optionalcontaining the latitude of the city.
-
setLatitude
Sets the latitude of the city.- Parameters:
latitude- AnOptionalcontaining the latitude of the city.- Returns:
- This CityPatchRequest instance.
-
getLongitude
Gets the longitude of the city.- Returns:
- An
Optionalcontaining the longitude of the city.
-
setLongitude
Sets the longitude of the city.- Parameters:
longitude- AnOptionalcontaining the longitude of the city.- Returns:
- This CityPatchRequest instance.
-