@ApiResponse(responseCode="400",description="A request parameter is not valid")
@ApiResponse(responseCode="404",description="No matching facilities were found")
publicinterfaceFacilitiesApi{
@GET
@Path("/byName")
@Operation(summary="Searches for facilities by their name.",description="Searches for facilities by their name, excluding prefix (e.g. The) and suffix (e.g. Golf Club), returning limited meta-data about each matched facility.")
@Tag(name="Search API")
PagedCollection<List<Facility>>searchByName(
@Parameter(description="A fragment or whole facility name; the prefix and suffix are not included",example="Bushwood")@QueryParam("name")@NotNull@Size(min=3)Stringname,
@BeanParam@ValidPaginationpaging);
@GET
@Path("/byLocation/{country}")
@Operation(summary="Searches for facilities by their location.",description="Searches for facilities by their country, returning limited meta-data about each matched facility.")
@Parameter(description="A country code",example="US")@PathParam("country")@NotNullStringcountry,
@BeanParam@ValidPaginationpaging);
@GET
@Path("/byLocation/{country}/{state}")
@Operation(summary="Searches for facilities by their location.",description="Searches for facilities by their major jurisdiction (e.g. US States), returning limited meta-data about each matched facility.")
@Parameter(description="A country code",example="US")@PathParam("country")@NotNullStringcountry,
@Parameter(description="A State or high-level jurisdiction",example="FL")@PathParam("state")@NotNullStringstate,
@BeanParam@ValidPaginationpaging);
@GET
@Path("/byGeo")
@Operation(summary="Searches for facilities by their location.",description="Searches for facilities by their major jurisdiction (e.g. US States), returning limited meta-data about each matched facility.")
@Parameter(description="A latitude in decimal degrees",example="41.2390")@QueryParam("latitude")@NotNull@DecimalMin("-90.0")@DecimalMax("90.0")doublelatitude,
@Parameter(description="A longitude in decimal degrees",example="-81.34891")@QueryParam("longitude")@NotNull@DecimalMin("-180.0")@DecimalMax("180.0")doublelongitude,
@Parameter(name="radius",description="A search radius in miles",example="15")@QueryParam("radius")@Positive@Max(100)IntegerradiusInMiles,