Class CityPatchRequest

java.lang.Object
org.localify.city.dto.CityPatchRequest

public class CityPatchRequest extends Object
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 Details

    • CityPatchRequest

      public CityPatchRequest()
  • Method Details

    • getName

      public Optional<String> getName()
      Gets the name of the city.
      Returns:
      An Optional containing the name of the city.
    • setName

      public CityPatchRequest setName(Optional<String> name)
      Sets the name of the city.
      Parameters:
      name - An Optional containing the name of the city.
      Returns:
      This CityPatchRequest instance.
    • getLatitude

      public Optional<Double> getLatitude()
      Gets the latitude of the city.
      Returns:
      An Optional containing the latitude of the city.
    • setLatitude

      public CityPatchRequest setLatitude(Optional<Double> latitude)
      Sets the latitude of the city.
      Parameters:
      latitude - An Optional containing the latitude of the city.
      Returns:
      This CityPatchRequest instance.
    • getLongitude

      public Optional<Double> getLongitude()
      Gets the longitude of the city.
      Returns:
      An Optional containing the longitude of the city.
    • setLongitude

      public CityPatchRequest setLongitude(Optional<Double> longitude)
      Sets the longitude of the city.
      Parameters:
      longitude - An Optional containing the longitude of the city.
      Returns:
      This CityPatchRequest instance.