Commit cabb31c9 authored by Karakas's avatar Karakas
Browse files

Merge branch 'devbackend' into 'master'

Merge Maximus

See merge request !4
parents 888289d4 249ac5e3
package io.swagger.api;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.model.InlineResponse200;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Schema;
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-04T09:41:03.559554872Z[GMT]")
@RestController
public class HistoricalweatherApiController implements HistoricalweatherApi {
private static final Logger log = LoggerFactory.getLogger(HistoricalweatherApiController.class);
private final ObjectMapper objectMapper;
@SuppressWarnings("unused")
private final HttpServletRequest request;
@org.springframework.beans.factory.annotation.Autowired
public HistoricalweatherApiController(ObjectMapper objectMapper, HttpServletRequest request) {
this.objectMapper = objectMapper;
this.request = request;
}
public ResponseEntity<InlineResponse200> historicalWeatherData(
@NotNull @Parameter(in = ParameterIn.QUERY, description = "Latitude of the location", required = true, schema = @Schema()) @Valid @RequestParam(value = "latitude", required = true) Float latitude,
@NotNull @Parameter(in = ParameterIn.QUERY, description = "Longitude of the location", required = true, schema = @Schema()) @Valid @RequestParam(value = "longitude", required = true) Float longitude,
@NotNull @Parameter(in = ParameterIn.QUERY, description = "The time interval to get weather data. A day must be specified as an ISO8601 date (e.g. 2022-12-31).", required = true, schema = @Schema()) @Valid @RequestParam(value = "start_date", required = true) String start_date,
@NotNull @Parameter(in = ParameterIn.QUERY, description = "The time interval to get weather data. A day must be specified as an ISO8601 date (e.g. 2022-12-31).", required = true, schema = @Schema()) @Valid @RequestParam(value = "end_date", required = true) String end_date,
@Parameter(in = ParameterIn.QUERY, description = "If fahrenheit is set, all temperature values are converted to Fahrenheit.", required = true, schema = @Schema()) @Valid @RequestParam(value = "temperature_unit", required = true) String temperature_unit,
@Parameter(in = ParameterIn.QUERY, description = "Other wind speed speed units: ms, mph and kn", required = true, schema = @Schema()) @Valid @RequestParam(value = "wind_speed_unit", required = true) String wind_speed_unit,
@Parameter(in = ParameterIn.QUERY, description = "Other precipitation amount units: inch", required = true, schema = @Schema()) @Valid @RequestParam(value = "precipitation_unit", required = true) String precipitation_unit,
@Parameter(in = ParameterIn.QUERY, description = "If timezone is set, all timestamps are returned as local-time and data is returned starting at 00:00 local-time. Any time zone name from the time zone database is supported If auto is set as a time zone, the coordinates will be automatically resolved to the local time zone. For multiple coordinates, a comma separated list of timezones can be specified.", required = false, schema = @Schema()) @Valid @RequestParam(value = "timezone", required = false) String timezone,
@Parameter(in = ParameterIn.QUERY, description = "filter parameter hourly", required = false, schema = @Schema()) @Valid @RequestParam(value = "filterHourly", required = false) String filterHourly,
@Parameter(in = ParameterIn.QUERY, description = "filter parameter daily", required = false, schema = @Schema()) @Valid @RequestParam(value = "filterDaily", required = false) String filterDaily
) {
try {
RestTemplate restTemplate = new RestTemplate();
ApiService apiService = new ApiService(restTemplate);
// Test Url:
// http://localhost:8080/historicalweather?latitude=48.7823&longitude=9.177&start_date=2024-05-24&end_date=2024-06-07&filterHourly=precipitation,temperature_2m&filterDaily=precipitation_sum,temperature_2m_max&temperature_unit=celsius&wind_speed_unit=kmh&precipitation_unit=mm
String data = apiService.getDataFromFirstApi(
"https://archive-api.open-meteo.com/v1/archive?latitude=" + latitude + "&longitude=" + longitude
+ "&start_date=" + start_date + "&end_date=" + end_date
+ "&hourly=" + filterHourly + "&daily=" + filterDaily + "&temperature_unit="
+ temperature_unit + "&wind_speed_unit=" + wind_speed_unit + "&precipitation_unit="
+ precipitation_unit);
ResponseEntity<InlineResponse200> response = new ResponseEntity<InlineResponse200>(objectMapper.readValue(
data, InlineResponse200.class), HttpStatus.ACCEPTED);
return response;
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<InlineResponse200>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
}
package io.swagger.api;
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-04T09:41:03.559554872Z[GMT]")
public class NotFoundException extends ApiException {
@SuppressWarnings("unused")
private int code;
public NotFoundException(int code, String msg) {
super(code, msg);
this.code = code;
}
}
package io.swagger.api;
import io.swagger.model.Search;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-09T14:41:38.246173275Z[GMT]")
@Validated
public interface SearchApi {
@Operation(summary = "Get all locations", description = "", tags = {})
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "A list of locations", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Search.class)))) })
@RequestMapping(value = "/search", produces = { "application/json" }, method = RequestMethod.GET)
ResponseEntity<List<Search>> searchGet(
@NotNull @Parameter(in = ParameterIn.QUERY, description = "Name of the city to filter locations by", required = true, schema = @Schema()) @Valid @RequestParam(value = "city", required = true) String city);
}
package io.swagger.api;
import io.swagger.model.Search;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Schema;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid;
import javax.validation.constraints.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-09T14:41:38.246173275Z[GMT]")
@RestController
public class SearchApiController implements SearchApi {
private static final Logger log = LoggerFactory.getLogger(SearchApiController.class);
private final ObjectMapper objectMapper;
@SuppressWarnings("unused")
private final HttpServletRequest request;
@org.springframework.beans.factory.annotation.Autowired
public SearchApiController(ObjectMapper objectMapper, HttpServletRequest request) {
this.objectMapper = objectMapper;
this.request = request;
}
public ResponseEntity<List<Search>> searchGet(
@NotNull @Parameter(in = ParameterIn.QUERY, description = "Name of the city to filter locations by", required = true, schema = @Schema()) @Valid @RequestParam(value = "city", required = true) String city) {
try {
RestTemplate restTemplate = new RestTemplate();
ApiService apiService = new ApiService(restTemplate);
String data = apiService.getDataFromFirstApi(
"http://api.weatherapi.com/v1/search.json?key=1244099aeaee4b179e6111803241304&q=" + city);
@SuppressWarnings("unchecked")
ResponseEntity<List<Search>> response = new ResponseEntity<List<Search>>(objectMapper.readValue(
data, List.class), HttpStatus.ACCEPTED);
return response;
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Search>>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
}
package io.swagger.configuration;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonTokenId;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils;
import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase;
import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction;
import com.fasterxml.jackson.datatype.threetenbp.function.Function;
import org.threeten.bp.DateTimeException;
import org.threeten.bp.DateTimeUtils;
import org.threeten.bp.Instant;
import org.threeten.bp.OffsetDateTime;
import org.threeten.bp.ZoneId;
import org.threeten.bp.ZonedDateTime;
import org.threeten.bp.format.DateTimeFormatter;
import org.threeten.bp.temporal.Temporal;
import org.threeten.bp.temporal.TemporalAccessor;
import java.io.IOException;
import java.math.BigDecimal;
/**
* Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime},
* and {@link ZonedDateTime}s.
* Adapted from the jackson threetenbp InstantDeserializer to add support for
* deserializing rfc822 format.
*
* @author Nick Williams
*/
public class CustomInstantDeserializer<T extends Temporal>
extends ThreeTenDateTimeDeserializerBase<T> {
private static final long serialVersionUID = 1L;
public static final CustomInstantDeserializer<Instant> INSTANT = new CustomInstantDeserializer<Instant>(
Instant.class, DateTimeFormatter.ISO_INSTANT,
new Function<TemporalAccessor, Instant>() {
@Override
public Instant apply(TemporalAccessor temporalAccessor) {
return Instant.from(temporalAccessor);
}
},
new Function<FromIntegerArguments, Instant>() {
@Override
public Instant apply(FromIntegerArguments a) {
return Instant.ofEpochMilli(a.value);
}
},
new Function<FromDecimalArguments, Instant>() {
@Override
public Instant apply(FromDecimalArguments a) {
return Instant.ofEpochSecond(a.integer, a.fraction);
}
},
null);
public static final CustomInstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME = new CustomInstantDeserializer<OffsetDateTime>(
OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME,
new Function<TemporalAccessor, OffsetDateTime>() {
@Override
public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
return OffsetDateTime.from(temporalAccessor);
}
},
new Function<FromIntegerArguments, OffsetDateTime>() {
@Override
public OffsetDateTime apply(FromIntegerArguments a) {
return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
}
},
new Function<FromDecimalArguments, OffsetDateTime>() {
@Override
public OffsetDateTime apply(FromDecimalArguments a) {
return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
}
},
new BiFunction<OffsetDateTime, ZoneId, OffsetDateTime>() {
@Override
public OffsetDateTime apply(OffsetDateTime d, ZoneId z) {
return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime()));
}
});
public static final CustomInstantDeserializer<ZonedDateTime> ZONED_DATE_TIME = new CustomInstantDeserializer<ZonedDateTime>(
ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME,
new Function<TemporalAccessor, ZonedDateTime>() {
@Override
public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
return ZonedDateTime.from(temporalAccessor);
}
},
new Function<FromIntegerArguments, ZonedDateTime>() {
@Override
public ZonedDateTime apply(FromIntegerArguments a) {
return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
}
},
new Function<FromDecimalArguments, ZonedDateTime>() {
@Override
public ZonedDateTime apply(FromDecimalArguments a) {
return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
}
},
new BiFunction<ZonedDateTime, ZoneId, ZonedDateTime>() {
@Override
public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) {
return zonedDateTime.withZoneSameInstant(zoneId);
}
});
protected final Function<FromIntegerArguments, T> fromMilliseconds;
protected final Function<FromDecimalArguments, T> fromNanoseconds;
protected final Function<TemporalAccessor, T> parsedToValue;
protected final BiFunction<T, ZoneId, T> adjust;
protected CustomInstantDeserializer(Class<T> supportedType,
DateTimeFormatter parser,
Function<TemporalAccessor, T> parsedToValue,
Function<FromIntegerArguments, T> fromMilliseconds,
Function<FromDecimalArguments, T> fromNanoseconds,
BiFunction<T, ZoneId, T> adjust) {
super(supportedType, parser);
this.parsedToValue = parsedToValue;
this.fromMilliseconds = fromMilliseconds;
this.fromNanoseconds = fromNanoseconds;
this.adjust = adjust == null ? new BiFunction<T, ZoneId, T>() {
@Override
public T apply(T t, ZoneId zoneId) {
return t;
}
} : adjust;
}
@SuppressWarnings("unchecked")
protected CustomInstantDeserializer(CustomInstantDeserializer<T> base, DateTimeFormatter f) {
super((Class<T>) base.handledType(), f);
parsedToValue = base.parsedToValue;
fromMilliseconds = base.fromMilliseconds;
fromNanoseconds = base.fromNanoseconds;
adjust = base.adjust;
}
@Override
protected JsonDeserializer<T> withDateFormat(DateTimeFormatter dtf) {
if (dtf == _formatter) {
return this;
}
return new CustomInstantDeserializer<T>(this, dtf);
}
@SuppressWarnings("deprecation")
@Override
public T deserialize(JsonParser parser, DeserializationContext context) throws IOException {
// NOTE: Timestamps contain no timezone info, and are always in configured TZ.
// Only
// string values have to be adjusted to the configured TZ.
switch (parser.getCurrentTokenId()) {
case JsonTokenId.ID_NUMBER_FLOAT: {
BigDecimal value = parser.getDecimalValue();
long seconds = value.longValue();
int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds);
return fromNanoseconds.apply(new FromDecimalArguments(
seconds, nanoseconds, getZone(context)));
}
case JsonTokenId.ID_NUMBER_INT: {
long timestamp = parser.getLongValue();
if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) {
return this.fromNanoseconds.apply(new FromDecimalArguments(
timestamp, 0, this.getZone(context)));
}
return this.fromMilliseconds.apply(new FromIntegerArguments(
timestamp, this.getZone(context)));
}
case JsonTokenId.ID_STRING: {
String string = parser.getText().trim();
if (string.length() == 0) {
return null;
}
if (string.endsWith("+0000")) {
string = string.substring(0, string.length() - 5) + "Z";
}
T value;
try {
TemporalAccessor acc = _formatter.parse(string);
value = parsedToValue.apply(acc);
if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) {
return adjust.apply(value, this.getZone(context));
}
} catch (DateTimeException e) {
throw _peelDTE(e);
}
return value;
}
}
throw context.mappingException("Expected type float, integer, or string.");
}
private ZoneId getZone(DeserializationContext context) {
// Instants are always in UTC, so don't waste compute cycles
return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone());
}
private static class FromIntegerArguments {
public final long value;
public final ZoneId zoneId;
private FromIntegerArguments(long value, ZoneId zoneId) {
this.value = value;
this.zoneId = zoneId;
}
}
private static class FromDecimalArguments {
public final long integer;
public final int fraction;
public final ZoneId zoneId;
private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) {
this.integer = integer;
this.fraction = fraction;
this.zoneId = zoneId;
}
}
}
package io.swagger.configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* Home redirection to swagger api documentation
*/
@Controller
public class HomeController {
@RequestMapping(value = "/")
public String index() {
return "redirect:/swagger-ui/";
}
}
package io.swagger.configuration;
import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.threeten.bp.Instant;
import org.threeten.bp.OffsetDateTime;
import org.threeten.bp.ZonedDateTime;
@Configuration
public class JacksonConfiguration {
@Bean
@ConditionalOnMissingBean(ThreeTenModule.class)
ThreeTenModule threeTenModule() {
ThreeTenModule module = new ThreeTenModule();
module.addDeserializer(Instant.class, CustomInstantDeserializer.INSTANT);
module.addDeserializer(OffsetDateTime.class, CustomInstantDeserializer.OFFSET_DATE_TIME);
module.addDeserializer(ZonedDateTime.class, CustomInstantDeserializer.ZONED_DATE_TIME);
return module;
}
}
package io.swagger.configuration;
import org.springframework.core.convert.converter.Converter;
import org.threeten.bp.LocalDate;
import org.threeten.bp.format.DateTimeFormatter;
public class LocalDateConverter implements Converter<String, LocalDate> {
private final DateTimeFormatter formatter;
public LocalDateConverter(String dateFormat) {
this.formatter = DateTimeFormatter.ofPattern(dateFormat);
}
@Override
public LocalDate convert(String source) {
if(source == null || source.isEmpty()) {
return null;
}
return LocalDate.parse(source, this.formatter);
}
}
package io.swagger.configuration;
import org.springframework.core.convert.converter.Converter;
import org.threeten.bp.LocalDateTime;
import org.threeten.bp.format.DateTimeFormatter;
public class LocalDateTimeConverter implements Converter<String, LocalDateTime> {
private final DateTimeFormatter formatter;
public LocalDateTimeConverter(String dateFormat) {
this.formatter = DateTimeFormatter.ofPattern(dateFormat);
}
@Override
public LocalDateTime convert(String source) {
if(source == null || source.isEmpty()) {
return null;
}
return LocalDateTime.parse(source, this.formatter);
}
}
package io.swagger.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-04T09:41:03.559554872Z[GMT]")
@Configuration
public class SwaggerDocumentationConfig {
@Bean
public OpenAPI openApi() {
return new OpenAPI()
.info(new Info()
.title("OpenWeatherMap API")
.description("Sample OpenWeather API.")
.termsOfService("")
.version("1.0")
.license(new License()
.name("")
.url("http://unlicense.org"))
.contact(new io.swagger.v3.oas.models.info.Contact()
.email("")));
}
}
package io.swagger.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-04T09:41:03.559554872Z[GMT]")
@Configuration
public class SwaggerUiConfiguration implements WebMvcConfigurer {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/swagger-ui/").setViewName("forward:/swagger-ui/index.html");
}
}
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import org.threeten.bp.OffsetDateTime;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.*;
/**
* Alerts
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-06T14:20:51.790816423Z[GMT]")
@JsonInclude(Include.NON_NULL)
public class Alerts {
@JsonProperty("headline")
private String headline = null;
@JsonProperty("msgtype")
private String msgtype = null;
@JsonProperty("severity")
private String severity = null;
@JsonProperty("urgency")
private String urgency = null;
@JsonProperty("areas")
private String areas = null;
@JsonProperty("category")
private String category = null;
@JsonProperty("certainty")
private String certainty = null;
@JsonProperty("event")
private String event = null;
@JsonProperty("note")
private String note = null;
@JsonProperty("effective")
private OffsetDateTime effective = null;
@JsonProperty("expires")
private OffsetDateTime expires = null;
@JsonProperty("desc")
private String desc = null;
@JsonProperty("instruction")
private String instruction = null;
public Alerts headline(String headline) {
this.headline = headline;
return this;
}
/**
* Get headline
*
* @return headline
**/
@Schema(description = "")
@NotNull
public String getHeadline() {
return headline;
}
public void setHeadline(String headline) {
this.headline = headline;
}
public Alerts msgtype(String msgtype) {
this.msgtype = msgtype;
return this;
}
/**
* Get msgtype
*
* @return msgtype
**/
@Schema(description = "")
public String getMsgtype() {
return msgtype;
}
public void setMsgtype(String msgtype) {
this.msgtype = msgtype;
}
public Alerts severity(String severity) {
this.severity = severity;
return this;
}
/**
* Get severity
*
* @return severity
**/
@Schema(description = "")
public String getSeverity() {
return severity;
}
public void setSeverity(String severity) {
this.severity = severity;
}
public Alerts urgency(String urgency) {
this.urgency = urgency;
return this;
}
/**
* Get urgency
*
* @return urgency
**/
@Schema(description = "")
public String getUrgency() {
return urgency;
}
public void setUrgency(String urgency) {
this.urgency = urgency;
}
public Alerts areas(String areas) {
this.areas = areas;
return this;
}
/**
* Get areas
*
* @return areas
**/
@Schema(description = "")
public String getAreas() {
return areas;
}
public void setAreas(String areas) {
this.areas = areas;
}
public Alerts category(String category) {
this.category = category;
return this;
}
/**
* Get category
*
* @return category
**/
@Schema(description = "")
@NotNull
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public Alerts certainty(String certainty) {
this.certainty = certainty;
return this;
}
/**
* Get certainty
*
* @return certainty
**/
@Schema(description = "")
public String getCertainty() {
return certainty;
}
public void setCertainty(String certainty) {
this.certainty = certainty;
}
public Alerts event(String event) {
this.event = event;
return this;
}
/**
* Get event
*
* @return event
**/
@Schema(description = "")
@NotNull
public String getEvent() {
return event;
}
public void setEvent(String event) {
this.event = event;
}
public Alerts note(String note) {
this.note = note;
return this;
}
/**
* Get note
*
* @return note
**/
@Schema(description = "")
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public Alerts effective(OffsetDateTime effective) {
this.effective = effective;
return this;
}
/**
* Get effective
*
* @return effective
**/
@Schema(description = "")
@NotNull
@Valid
public OffsetDateTime getEffective() {
return effective;
}
public void setEffective(OffsetDateTime effective) {
this.effective = effective;
}
public Alerts expires(OffsetDateTime expires) {
this.expires = expires;
return this;
}
/**
* Get expires
*
* @return expires
**/
@Schema(description = "")
@NotNull
@Valid
public OffsetDateTime getExpires() {
return expires;
}
public void setExpires(OffsetDateTime expires) {
this.expires = expires;
}
public Alerts desc(String desc) {
this.desc = desc;
return this;
}
/**
* Get desc
*
* @return desc
**/
@Schema(description = "")
@NotNull
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public Alerts instruction(String instruction) {
this.instruction = instruction;
return this;
}
/**
* Get instruction
*
* @return instruction
**/
@Schema(description = "")
@NotNull
public String getInstruction() {
return instruction;
}
public void setInstruction(String instruction) {
this.instruction = instruction;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Alerts alerts = (Alerts) o;
return Objects.equals(this.headline, alerts.headline) &&
Objects.equals(this.msgtype, alerts.msgtype) &&
Objects.equals(this.severity, alerts.severity) &&
Objects.equals(this.urgency, alerts.urgency) &&
Objects.equals(this.areas, alerts.areas) &&
Objects.equals(this.category, alerts.category) &&
Objects.equals(this.certainty, alerts.certainty) &&
Objects.equals(this.event, alerts.event) &&
Objects.equals(this.note, alerts.note) &&
Objects.equals(this.effective, alerts.effective) &&
Objects.equals(this.expires, alerts.expires) &&
Objects.equals(this.desc, alerts.desc) &&
Objects.equals(this.instruction, alerts.instruction);
}
@Override
public int hashCode() {
return Objects.hash(headline, msgtype, severity, urgency, areas, category, certainty, event, note, effective,
expires, desc, instruction);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Alerts {\n");
sb.append(" headline: ").append(toIndentedString(headline)).append("\n");
sb.append(" msgtype: ").append(toIndentedString(msgtype)).append("\n");
sb.append(" severity: ").append(toIndentedString(severity)).append("\n");
sb.append(" urgency: ").append(toIndentedString(urgency)).append("\n");
sb.append(" areas: ").append(toIndentedString(areas)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" certainty: ").append(toIndentedString(certainty)).append("\n");
sb.append(" event: ").append(toIndentedString(event)).append("\n");
sb.append(" note: ").append(toIndentedString(note)).append("\n");
sb.append(" effective: ").append(toIndentedString(effective)).append("\n");
sb.append(" expires: ").append(toIndentedString(expires)).append("\n");
sb.append(" desc: ").append(toIndentedString(desc)).append("\n");
sb.append(" instruction: ").append(toIndentedString(instruction)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.*;
/**
* Astro
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-06T14:20:51.790816423Z[GMT]")
@JsonInclude(Include.NON_NULL)
public class Astro {
@JsonProperty("sunrise")
private String sunrise = null;
@JsonProperty("sunset")
private String sunset = null;
@JsonProperty("moonrise")
private String moonrise = null;
@JsonProperty("moonset")
private String moonset = null;
@JsonProperty("moon_phase")
private String moonPhase = null;
@JsonProperty("moon_illumination")
private String moonIllumination = null;
public Astro sunrise(String sunrise) {
this.sunrise = sunrise;
return this;
}
/**
* Get sunrise
*
* @return sunrise
**/
@Schema(description = "")
@NotNull
public String getSunrise() {
return sunrise;
}
public void setSunrise(String sunrise) {
this.sunrise = sunrise;
}
public Astro sunset(String sunset) {
this.sunset = sunset;
return this;
}
/**
* Get sunset
*
* @return sunset
**/
@Schema(description = "")
@NotNull
public String getSunset() {
return sunset;
}
public void setSunset(String sunset) {
this.sunset = sunset;
}
public Astro moonrise(String moonrise) {
this.moonrise = moonrise;
return this;
}
/**
* Get moonrise
*
* @return moonrise
**/
@Schema(description = "")
@NotNull
public String getMoonrise() {
return moonrise;
}
public void setMoonrise(String moonrise) {
this.moonrise = moonrise;
}
public Astro moonset(String moonset) {
this.moonset = moonset;
return this;
}
/**
* Get moonset
*
* @return moonset
**/
@Schema(description = "")
@NotNull
public String getMoonset() {
return moonset;
}
public void setMoonset(String moonset) {
this.moonset = moonset;
}
public Astro moonPhase(String moonPhase) {
this.moonPhase = moonPhase;
return this;
}
/**
* Get moonPhase
*
* @return moonPhase
**/
@Schema(description = "")
@NotNull
public String getMoonPhase() {
return moonPhase;
}
public void setMoonPhase(String moonPhase) {
this.moonPhase = moonPhase;
}
public Astro moonIllumination(String moonIllumination) {
this.moonIllumination = moonIllumination;
return this;
}
/**
* Get moonIllumination
*
* @return moonIllumination
**/
@Schema(description = "")
@NotNull
public String getMoonIllumination() {
return moonIllumination;
}
public void setMoonIllumination(String moonIllumination) {
this.moonIllumination = moonIllumination;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Astro astro = (Astro) o;
return Objects.equals(this.sunrise, astro.sunrise) &&
Objects.equals(this.sunset, astro.sunset) &&
Objects.equals(this.moonrise, astro.moonrise) &&
Objects.equals(this.moonset, astro.moonset) &&
Objects.equals(this.moonPhase, astro.moonPhase) &&
Objects.equals(this.moonIllumination, astro.moonIllumination);
}
@Override
public int hashCode() {
return Objects.hash(sunrise, sunset, moonrise, moonset, moonPhase, moonIllumination);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Astro {\n");
sb.append(" sunrise: ").append(toIndentedString(sunrise)).append("\n");
sb.append(" sunset: ").append(toIndentedString(sunset)).append("\n");
sb.append(" moonrise: ").append(toIndentedString(moonrise)).append("\n");
sb.append(" moonset: ").append(toIndentedString(moonset)).append("\n");
sb.append(" moonPhase: ").append(toIndentedString(moonPhase)).append("\n");
sb.append(" moonIllumination: ").append(toIndentedString(moonIllumination)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.*;
/**
* Weather
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-04T09:41:03.559554872Z[GMT]")
@JsonInclude(Include.NON_NULL)
public class Current {
@JsonProperty("last_updated_epoch")
private Integer lastUpdatedEpoch = null;
@JsonProperty("last_updated")
private String lastUpdated = null;
@JsonProperty("temp_c")
private BigDecimal tempC = null;
@JsonProperty("temp_f")
private BigDecimal tempF = null;
@JsonProperty("id_day")
private BigDecimal idDay = null;
@JsonProperty("condition")
private WeatherCondition condition = null;
@JsonProperty("wind_mph")
private BigDecimal windMph = null;
@JsonProperty("wind_kph")
private BigDecimal windKph = null;
@JsonProperty("wind_degree")
private Integer windDegree = null;
@JsonProperty("wind_dir")
private String windDir = null;
@JsonProperty("pressure_mb")
private BigDecimal pressureMb = null;
@JsonProperty("pressure_in")
private BigDecimal pressureIn = null;
@JsonProperty("precip_mm")
private BigDecimal precipMm = null;
@JsonProperty("precip_in")
private BigDecimal precipIn = null;
@JsonProperty("humidity")
private Integer humidity = null;
@JsonProperty("cloud")
private Integer cloud = null;
@JsonProperty("feelslike_c")
private BigDecimal feelslikeC = null;
@JsonProperty("feelslike_f")
private BigDecimal feelslikeF = null;
@JsonProperty("windchill_c")
private BigDecimal windchillC = null;
@JsonProperty("windchill_f")
private BigDecimal windchillF = null;
@JsonProperty("heatindex_c")
private Integer heatindexC = null;
@JsonProperty("heatindex_f")
private BigDecimal heatindexF = null;
@JsonProperty("dewpoint_c")
private BigDecimal dewpointC = null;
@JsonProperty("dewpoint_f")
private BigDecimal dewpointF = null;
@JsonProperty("vis_km")
private BigDecimal visKm = null;
@JsonProperty("vis_miles")
private BigDecimal visMiles = null;
@JsonProperty("uv")
private BigDecimal uv = null;
@JsonProperty("gust_mph")
private BigDecimal gustMph = null;
@JsonProperty("gust_kph")
private BigDecimal gustKph = null;
@JsonProperty("air_quality")
private WeatherAirQuality airQuality = null;
public Current lastUpdatedEpoch(Integer lastUpdatedEpoch) {
this.lastUpdatedEpoch = lastUpdatedEpoch;
return this;
}
/**
* uptated epoch
*
* @return lastUpdatedEpoch
**/
@Schema(example = "1238213521", description = "uptated epoch")
@NotNull
public Integer getLastUpdatedEpoch() {
return lastUpdatedEpoch;
}
public void setLastUpdatedEpoch(Integer lastUpdatedEpoch) {
this.lastUpdatedEpoch = lastUpdatedEpoch;
}
public Current lastUpdated(String lastUpdated) {
this.lastUpdated = lastUpdated;
return this;
}
/**
* last updated
*
* @return lastUpdated
**/
@Schema(example = "2001-10-09 10:07", description = "last updated")
@NotNull
public String getLastUpdated() {
return lastUpdated;
}
public void setLastUpdated(String lastUpdated) {
this.lastUpdated = lastUpdated;
}
public Current tempC(BigDecimal tempC) {
this.tempC = tempC;
return this;
}
/**
* temperature celcius
*
* @return tempC
**/
@Schema(example = "8.3", description = "temperature celcius")
@NotNull
@Valid
public BigDecimal getTempC() {
return tempC;
}
public void setTempC(BigDecimal tempC) {
this.tempC = tempC;
}
public Current tempF(BigDecimal tempF) {
this.tempF = tempF;
return this;
}
/**
* temperature fahrenheit
*
* @return tempF
**/
@Schema(example = "8.8", description = "temperature fahrenheit")
@NotNull
@Valid
public BigDecimal getTempF() {
return tempF;
}
public void setTempF(BigDecimal tempF) {
this.tempF = tempF;
}
public Current idDay(BigDecimal idDay) {
this.idDay = idDay;
return this;
}
/**
* day id
*
* @return idDay
**/
@Schema(example = "803.29", description = "day id")
@NotNull
@Valid
public BigDecimal getIdDay() {
return idDay;
}
public void setIdDay(BigDecimal idDay) {
this.idDay = idDay;
}
public Current condition(WeatherCondition condition) {
this.condition = condition;
return this;
}
/**
* Get condition
*
* @return condition
**/
@Schema(description = "")
@NotNull
@Valid
public WeatherCondition getCondition() {
return condition;
}
public void setCondition(WeatherCondition condition) {
this.condition = condition;
}
public Current windMph(BigDecimal windMph) {
this.windMph = windMph;
return this;
}
/**
* Get windMph
*
* @return windMph
**/
@Schema(example = "80.39", description = "")
@NotNull
@Valid
public BigDecimal getWindMph() {
return windMph;
}
public void setWindMph(BigDecimal windMph) {
this.windMph = windMph;
}
public Current windKph(BigDecimal windKph) {
this.windKph = windKph;
return this;
}
/**
* Get windKph
*
* @return windKph
**/
@Schema(example = "803.29", description = "")
@NotNull
@Valid
public BigDecimal getWindKph() {
return windKph;
}
public void setWindKph(BigDecimal windKph) {
this.windKph = windKph;
}
public Current windDegree(Integer windDegree) {
this.windDegree = windDegree;
return this;
}
/**
* Get windDegree
*
* @return windDegree
**/
@Schema(example = "803234", description = "")
@NotNull
public Integer getWindDegree() {
return windDegree;
}
public void setWindDegree(Integer windDegree) {
this.windDegree = windDegree;
}
public Current windDir(String windDir) {
this.windDir = windDir;
return this;
}
/**
* Get windDir
*
* @return windDir
**/
@Schema(example = "SSE", description = "")
@NotNull
public String getWindDir() {
return windDir;
}
public void setWindDir(String windDir) {
this.windDir = windDir;
}
public Current pressureMb(BigDecimal pressureMb) {
this.pressureMb = pressureMb;
return this;
}
/**
* Get pressureMb
*
* @return pressureMb
**/
@Schema(example = "86.5", description = "")
@NotNull
@Valid
public BigDecimal getPressureMb() {
return pressureMb;
}
public void setPressureMb(BigDecimal pressureMb) {
this.pressureMb = pressureMb;
}
public Current pressureIn(BigDecimal pressureIn) {
this.pressureIn = pressureIn;
return this;
}
/**
* Get pressureIn
*
* @return pressureIn
**/
@Schema(example = "803.3841", description = "")
@NotNull
@Valid
public BigDecimal getPressureIn() {
return pressureIn;
}
public void setPressureIn(BigDecimal pressureIn) {
this.pressureIn = pressureIn;
}
public Current precipMm(BigDecimal precipMm) {
this.precipMm = precipMm;
return this;
}
/**
* Get precipMm
*
* @return precipMm
**/
@Schema(example = "803.438", description = "")
@NotNull
@Valid
public BigDecimal getPrecipMm() {
return precipMm;
}
public void setPrecipMm(BigDecimal precipMm) {
this.precipMm = precipMm;
}
public Current precipIn(BigDecimal precipIn) {
this.precipIn = precipIn;
return this;
}
/**
* Get precipIn
*
* @return precipIn
**/
@Schema(example = "803.473", description = "")
@NotNull
@Valid
public BigDecimal getPrecipIn() {
return precipIn;
}
public void setPrecipIn(BigDecimal precipIn) {
this.precipIn = precipIn;
}
public Current humidity(Integer humidity) {
this.humidity = humidity;
return this;
}
/**
* Get humidity
*
* @return humidity
**/
@Schema(example = "8039", description = "")
@NotNull
public Integer getHumidity() {
return humidity;
}
public void setHumidity(Integer humidity) {
this.humidity = humidity;
}
public Current cloud(Integer cloud) {
this.cloud = cloud;
return this;
}
/**
* Get cloud
*
* @return cloud
**/
@Schema(example = "80338", description = "")
@NotNull
public Integer getCloud() {
return cloud;
}
public void setCloud(Integer cloud) {
this.cloud = cloud;
}
public Current feelslikeC(BigDecimal feelslikeC) {
this.feelslikeC = feelslikeC;
return this;
}
/**
* Get feelslikeC
*
* @return feelslikeC
**/
@Schema(example = "803.463", description = "")
@NotNull
@Valid
public BigDecimal getFeelslikeC() {
return feelslikeC;
}
public void setFeelslikeC(BigDecimal feelslikeC) {
this.feelslikeC = feelslikeC;
}
public Current feelslikeF(BigDecimal feelslikeF) {
this.feelslikeF = feelslikeF;
return this;
}
/**
* Get feelslikeF
*
* @return feelslikeF
**/
@Schema(example = "803.463", description = "")
@NotNull
@Valid
public BigDecimal getFeelslikeF() {
return feelslikeF;
}
public void setFeelslikeF(BigDecimal feelslikeF) {
this.feelslikeF = feelslikeF;
}
public Current windchillC(BigDecimal windchillC) {
this.windchillC = windchillC;
return this;
}
/**
* Get windchillC
*
* @return windchillC
**/
@Schema(example = "803.367", description = "")
@NotNull
@Valid
public BigDecimal getWindchillC() {
return windchillC;
}
public void setWindchillC(BigDecimal windchillC) {
this.windchillC = windchillC;
}
public Current windchillF(BigDecimal windchillF) {
this.windchillF = windchillF;
return this;
}
/**
* Get windchillF
*
* @return windchillF
**/
@Schema(example = "803.478", description = "")
@NotNull
@Valid
public BigDecimal getWindchillF() {
return windchillF;
}
public void setWindchillF(BigDecimal windchillF) {
this.windchillF = windchillF;
}
public Current heatindexC(Integer heatindexC) {
this.heatindexC = heatindexC;
return this;
}
/**
* Get heatindexC
*
* @return heatindexC
**/
@Schema(example = "803287", description = "")
@NotNull
public Integer getHeatindexC() {
return heatindexC;
}
public void setHeatindexC(Integer heatindexC) {
this.heatindexC = heatindexC;
}
public Current heatindexF(BigDecimal heatindexF) {
this.heatindexF = heatindexF;
return this;
}
/**
* Get heatindexF
*
* @return heatindexF
**/
@Schema(example = "803.736", description = "")
@NotNull
@Valid
public BigDecimal getHeatindexF() {
return heatindexF;
}
public void setHeatindexF(BigDecimal heatindexF) {
this.heatindexF = heatindexF;
}
public Current dewpointC(BigDecimal dewpointC) {
this.dewpointC = dewpointC;
return this;
}
/**
* Get dewpointC
*
* @return dewpointC
**/
@Schema(example = "803.83", description = "")
@NotNull
@Valid
public BigDecimal getDewpointC() {
return dewpointC;
}
public void setDewpointC(BigDecimal dewpointC) {
this.dewpointC = dewpointC;
}
public Current dewpointF(BigDecimal dewpointF) {
this.dewpointF = dewpointF;
return this;
}
/**
* Get dewpointF
*
* @return dewpointF
**/
@Schema(example = "803.38", description = "")
@NotNull
@Valid
public BigDecimal getDewpointF() {
return dewpointF;
}
public void setDewpointF(BigDecimal dewpointF) {
this.dewpointF = dewpointF;
}
public Current visKm(BigDecimal visKm) {
this.visKm = visKm;
return this;
}
/**
* Get visKm
*
* @return visKm
**/
@Schema(example = "803.37", description = "")
@NotNull
@Valid
public BigDecimal getVisKm() {
return visKm;
}
public void setVisKm(BigDecimal visKm) {
this.visKm = visKm;
}
public Current visMiles(BigDecimal visMiles) {
this.visMiles = visMiles;
return this;
}
/**
* Get visMiles
*
* @return visMiles
**/
@Schema(example = "803.48", description = "")
@NotNull
@Valid
public BigDecimal getVisMiles() {
return visMiles;
}
public void setVisMiles(BigDecimal visMiles) {
this.visMiles = visMiles;
}
public Current uv(BigDecimal uv) {
this.uv = uv;
return this;
}
/**
* Get uv
*
* @return uv
**/
@Schema(example = "803.473", description = "")
@NotNull
@Valid
public BigDecimal getUv() {
return uv;
}
public void setUv(BigDecimal uv) {
this.uv = uv;
}
public Current gustMph(BigDecimal gustMph) {
this.gustMph = gustMph;
return this;
}
/**
* Get gustMph
*
* @return gustMph
**/
@Schema(example = "803.37", description = "")
@NotNull
@Valid
public BigDecimal getGustMph() {
return gustMph;
}
public void setGustMph(BigDecimal gustMph) {
this.gustMph = gustMph;
}
public Current gustKph(BigDecimal gustKph) {
this.gustKph = gustKph;
return this;
}
/**
* Get gustKph
*
* @return gustKph
**/
@Schema(example = "803.3662", description = "")
@NotNull
@Valid
public BigDecimal getGustKph() {
return gustKph;
}
public void setGustKph(BigDecimal gustKph) {
this.gustKph = gustKph;
}
public Current airQuality(WeatherAirQuality airQuality) {
this.airQuality = airQuality;
return this;
}
/**
* Get airQuality
*
* @return airQuality
**/
@Schema(description = "")
@NotNull
@Valid
public WeatherAirQuality getAirQuality() {
return airQuality;
}
public void setAirQuality(WeatherAirQuality airQuality) {
this.airQuality = airQuality;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Current weather = (Current) o;
return Objects.equals(this.lastUpdatedEpoch, weather.lastUpdatedEpoch) &&
Objects.equals(this.lastUpdated, weather.lastUpdated) &&
Objects.equals(this.tempC, weather.tempC) &&
Objects.equals(this.tempF, weather.tempF) &&
Objects.equals(this.idDay, weather.idDay) &&
Objects.equals(this.condition, weather.condition) &&
Objects.equals(this.windMph, weather.windMph) &&
Objects.equals(this.windKph, weather.windKph) &&
Objects.equals(this.windDegree, weather.windDegree) &&
Objects.equals(this.windDir, weather.windDir) &&
Objects.equals(this.pressureMb, weather.pressureMb) &&
Objects.equals(this.pressureIn, weather.pressureIn) &&
Objects.equals(this.precipMm, weather.precipMm) &&
Objects.equals(this.precipIn, weather.precipIn) &&
Objects.equals(this.humidity, weather.humidity) &&
Objects.equals(this.cloud, weather.cloud) &&
Objects.equals(this.feelslikeC, weather.feelslikeC) &&
Objects.equals(this.feelslikeF, weather.feelslikeF) &&
Objects.equals(this.windchillC, weather.windchillC) &&
Objects.equals(this.windchillF, weather.windchillF) &&
Objects.equals(this.heatindexC, weather.heatindexC) &&
Objects.equals(this.heatindexF, weather.heatindexF) &&
Objects.equals(this.dewpointC, weather.dewpointC) &&
Objects.equals(this.dewpointF, weather.dewpointF) &&
Objects.equals(this.visKm, weather.visKm) &&
Objects.equals(this.visMiles, weather.visMiles) &&
Objects.equals(this.uv, weather.uv) &&
Objects.equals(this.gustMph, weather.gustMph) &&
Objects.equals(this.gustKph, weather.gustKph) &&
Objects.equals(this.airQuality, weather.airQuality);
}
@Override
public int hashCode() {
return Objects.hash(lastUpdatedEpoch, lastUpdated, tempC, tempF, idDay, condition, windMph, windKph, windDegree,
windDir, pressureMb, pressureIn, precipMm, precipIn, humidity, cloud, feelslikeC, feelslikeF, windchillC,
windchillF, heatindexC, heatindexF, dewpointC, dewpointF, visKm, visMiles, uv, gustMph, gustKph, airQuality);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Weather {\n");
sb.append(" lastUpdatedEpoch: ").append(toIndentedString(lastUpdatedEpoch)).append("\n");
sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n");
sb.append(" tempC: ").append(toIndentedString(tempC)).append("\n");
sb.append(" tempF: ").append(toIndentedString(tempF)).append("\n");
sb.append(" idDay: ").append(toIndentedString(idDay)).append("\n");
sb.append(" condition: ").append(toIndentedString(condition)).append("\n");
sb.append(" windMph: ").append(toIndentedString(windMph)).append("\n");
sb.append(" windKph: ").append(toIndentedString(windKph)).append("\n");
sb.append(" windDegree: ").append(toIndentedString(windDegree)).append("\n");
sb.append(" windDir: ").append(toIndentedString(windDir)).append("\n");
sb.append(" pressureMb: ").append(toIndentedString(pressureMb)).append("\n");
sb.append(" pressureIn: ").append(toIndentedString(pressureIn)).append("\n");
sb.append(" precipMm: ").append(toIndentedString(precipMm)).append("\n");
sb.append(" precipIn: ").append(toIndentedString(precipIn)).append("\n");
sb.append(" humidity: ").append(toIndentedString(humidity)).append("\n");
sb.append(" cloud: ").append(toIndentedString(cloud)).append("\n");
sb.append(" feelslikeC: ").append(toIndentedString(feelslikeC)).append("\n");
sb.append(" feelslikeF: ").append(toIndentedString(feelslikeF)).append("\n");
sb.append(" windchillC: ").append(toIndentedString(windchillC)).append("\n");
sb.append(" windchillF: ").append(toIndentedString(windchillF)).append("\n");
sb.append(" heatindexC: ").append(toIndentedString(heatindexC)).append("\n");
sb.append(" heatindexF: ").append(toIndentedString(heatindexF)).append("\n");
sb.append(" dewpointC: ").append(toIndentedString(dewpointC)).append("\n");
sb.append(" dewpointF: ").append(toIndentedString(dewpointF)).append("\n");
sb.append(" visKm: ").append(toIndentedString(visKm)).append("\n");
sb.append(" visMiles: ").append(toIndentedString(visMiles)).append("\n");
sb.append(" uv: ").append(toIndentedString(uv)).append("\n");
sb.append(" gustMph: ").append(toIndentedString(gustMph)).append("\n");
sb.append(" gustKph: ").append(toIndentedString(gustKph)).append("\n");
sb.append(" airQuality: ").append(toIndentedString(airQuality)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.*;
/**
* DayCondition
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-06T14:20:51.790816423Z[GMT]")
@JsonInclude(Include.NON_NULL)
public class DayCondition {
@JsonProperty("maxtemp_c")
private Float maxtempC = null;
@JsonProperty("maxtemp_f")
private Float maxtempF = null;
@JsonProperty("mintemp_c")
private Float mintempC = null;
@JsonProperty("mintemp_f")
private Float mintempF = null;
@JsonProperty("avgtemp_c")
private Float avgtempC = null;
@JsonProperty("avgtemp_f")
private Float avgtempF = null;
@JsonProperty("maxwind_mph")
private Float maxwindMph = null;
@JsonProperty("maxwind_kph")
private Float maxwindKph = null;
@JsonProperty("totalprecip_mm")
private Float totalprecipMm = null;
@JsonProperty("totalprecip_in")
private Float totalprecipIn = null;
@JsonProperty("avgvis_km")
private Float avgvisKm = null;
@JsonProperty("avgvis_miles")
private Float avgvisMiles = null;
@JsonProperty("avghumidity")
private Integer avghumidity = null;
@JsonProperty("daily_will_it_rain")
private Integer dailyWillItRain = null;
@JsonProperty("daily_chance_of_rain")
private Integer dailyChanceOfRain = null;
@JsonProperty("daily_will_it_snow")
private Integer dailyWillItSnow = null;
@JsonProperty("daily_chance_of_snow")
private Integer dailyChanceOfSnow = null;
@JsonProperty("uv")
private Float uv = null;
public DayCondition maxtempC(Float maxtempC) {
this.maxtempC = maxtempC;
return this;
}
/**
* Get maxtempC
*
* @return maxtempC
**/
@Schema(description = "")
@NotNull
public Float getMaxtempC() {
return maxtempC;
}
public void setMaxtempC(Float maxtempC) {
this.maxtempC = maxtempC;
}
public DayCondition maxtempF(Float maxtempF) {
this.maxtempF = maxtempF;
return this;
}
/**
* Get maxtempF
*
* @return maxtempF
**/
@Schema(description = "")
@NotNull
public Float getMaxtempF() {
return maxtempF;
}
public void setMaxtempF(Float maxtempF) {
this.maxtempF = maxtempF;
}
public DayCondition mintempC(Float mintempC) {
this.mintempC = mintempC;
return this;
}
/**
* Get mintempC
*
* @return mintempC
**/
@Schema(description = "")
@NotNull
public Float getMintempC() {
return mintempC;
}
public void setMintempC(Float mintempC) {
this.mintempC = mintempC;
}
public DayCondition mintempF(Float mintempF) {
this.mintempF = mintempF;
return this;
}
/**
* Get mintempF
*
* @return mintempF
**/
@Schema(description = "")
@NotNull
public Float getMintempF() {
return mintempF;
}
public void setMintempF(Float mintempF) {
this.mintempF = mintempF;
}
public DayCondition avgtempC(Float avgtempC) {
this.avgtempC = avgtempC;
return this;
}
/**
* Get avgtempC
*
* @return avgtempC
**/
@Schema(description = "")
@NotNull
public Float getAvgtempC() {
return avgtempC;
}
public void setAvgtempC(Float avgtempC) {
this.avgtempC = avgtempC;
}
public DayCondition avgtempF(Float avgtempF) {
this.avgtempF = avgtempF;
return this;
}
/**
* Get avgtempF
*
* @return avgtempF
**/
@Schema(description = "")
@NotNull
public Float getAvgtempF() {
return avgtempF;
}
public void setAvgtempF(Float avgtempF) {
this.avgtempF = avgtempF;
}
public DayCondition maxwindMph(Float maxwindMph) {
this.maxwindMph = maxwindMph;
return this;
}
/**
* Get maxwindMph
*
* @return maxwindMph
**/
@Schema(description = "")
@NotNull
public Float getMaxwindMph() {
return maxwindMph;
}
public void setMaxwindMph(Float maxwindMph) {
this.maxwindMph = maxwindMph;
}
public DayCondition maxwindKph(Float maxwindKph) {
this.maxwindKph = maxwindKph;
return this;
}
/**
* Get maxwindKph
*
* @return maxwindKph
**/
@Schema(description = "")
@NotNull
public Float getMaxwindKph() {
return maxwindKph;
}
public void setMaxwindKph(Float maxwindKph) {
this.maxwindKph = maxwindKph;
}
public DayCondition totalprecipMm(Float totalprecipMm) {
this.totalprecipMm = totalprecipMm;
return this;
}
/**
* Get totalprecipMm
*
* @return totalprecipMm
**/
@Schema(description = "")
@NotNull
public Float getTotalprecipMm() {
return totalprecipMm;
}
public void setTotalprecipMm(Float totalprecipMm) {
this.totalprecipMm = totalprecipMm;
}
public DayCondition totalprecipIn(Float totalprecipIn) {
this.totalprecipIn = totalprecipIn;
return this;
}
/**
* Get totalprecipIn
*
* @return totalprecipIn
**/
@Schema(description = "")
@NotNull
public Float getTotalprecipIn() {
return totalprecipIn;
}
public void setTotalprecipIn(Float totalprecipIn) {
this.totalprecipIn = totalprecipIn;
}
public DayCondition avgvisKm(Float avgvisKm) {
this.avgvisKm = avgvisKm;
return this;
}
/**
* Get avgvisKm
*
* @return avgvisKm
**/
@Schema(description = "")
@NotNull
public Float getAvgvisKm() {
return avgvisKm;
}
public void setAvgvisKm(Float avgvisKm) {
this.avgvisKm = avgvisKm;
}
public DayCondition avgvisMiles(Float avgvisMiles) {
this.avgvisMiles = avgvisMiles;
return this;
}
/**
* Get avgvisMiles
*
* @return avgvisMiles
**/
@Schema(description = "")
@NotNull
public Float getAvgvisMiles() {
return avgvisMiles;
}
public void setAvgvisMiles(Float avgvisMiles) {
this.avgvisMiles = avgvisMiles;
}
public DayCondition avghumidity(Integer avghumidity) {
this.avghumidity = avghumidity;
return this;
}
/**
* Get avghumidity
*
* @return avghumidity
**/
@Schema(description = "")
@NotNull
public Integer getAvghumidity() {
return avghumidity;
}
public void setAvghumidity(Integer avghumidity) {
this.avghumidity = avghumidity;
}
public DayCondition dailyWillItRain(Integer dailyWillItRain) {
this.dailyWillItRain = dailyWillItRain;
return this;
}
/**
* Get dailyWillItRain
*
* @return dailyWillItRain
**/
@Schema(description = "")
@NotNull
public Integer getDailyWillItRain() {
return dailyWillItRain;
}
public void setDailyWillItRain(Integer dailyWillItRain) {
this.dailyWillItRain = dailyWillItRain;
}
public DayCondition dailyChanceOfRain(Integer dailyChanceOfRain) {
this.dailyChanceOfRain = dailyChanceOfRain;
return this;
}
/**
* Get dailyChanceOfRain
*
* @return dailyChanceOfRain
**/
@Schema(description = "")
@NotNull
public Integer getDailyChanceOfRain() {
return dailyChanceOfRain;
}
public void setDailyChanceOfRain(Integer dailyChanceOfRain) {
this.dailyChanceOfRain = dailyChanceOfRain;
}
public DayCondition dailyWillItSnow(Integer dailyWillItSnow) {
this.dailyWillItSnow = dailyWillItSnow;
return this;
}
/**
* Get dailyWillItSnow
*
* @return dailyWillItSnow
**/
@Schema(description = "")
@NotNull
public Integer getDailyWillItSnow() {
return dailyWillItSnow;
}
public void setDailyWillItSnow(Integer dailyWillItSnow) {
this.dailyWillItSnow = dailyWillItSnow;
}
public DayCondition dailyChanceOfSnow(Integer dailyChanceOfSnow) {
this.dailyChanceOfSnow = dailyChanceOfSnow;
return this;
}
/**
* Get dailyChanceOfSnow
*
* @return dailyChanceOfSnow
**/
@Schema(description = "")
@NotNull
public Integer getDailyChanceOfSnow() {
return dailyChanceOfSnow;
}
public void setDailyChanceOfSnow(Integer dailyChanceOfSnow) {
this.dailyChanceOfSnow = dailyChanceOfSnow;
}
public DayCondition uv(Float uv) {
this.uv = uv;
return this;
}
/**
* Get uv
*
* @return uv
**/
@Schema(description = "")
@NotNull
public Float getUv() {
return uv;
}
public void setUv(Float uv) {
this.uv = uv;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DayCondition dayCondition = (DayCondition) o;
return Objects.equals(this.maxtempC, dayCondition.maxtempC) &&
Objects.equals(this.maxtempF, dayCondition.maxtempF) &&
Objects.equals(this.mintempC, dayCondition.mintempC) &&
Objects.equals(this.mintempF, dayCondition.mintempF) &&
Objects.equals(this.avgtempC, dayCondition.avgtempC) &&
Objects.equals(this.avgtempF, dayCondition.avgtempF) &&
Objects.equals(this.maxwindMph, dayCondition.maxwindMph) &&
Objects.equals(this.maxwindKph, dayCondition.maxwindKph) &&
Objects.equals(this.totalprecipMm, dayCondition.totalprecipMm) &&
Objects.equals(this.totalprecipIn, dayCondition.totalprecipIn) &&
Objects.equals(this.avgvisKm, dayCondition.avgvisKm) &&
Objects.equals(this.avgvisMiles, dayCondition.avgvisMiles) &&
Objects.equals(this.avghumidity, dayCondition.avghumidity) &&
Objects.equals(this.dailyWillItRain, dayCondition.dailyWillItRain) &&
Objects.equals(this.dailyChanceOfRain, dayCondition.dailyChanceOfRain) &&
Objects.equals(this.dailyWillItSnow, dayCondition.dailyWillItSnow) &&
Objects.equals(this.dailyChanceOfSnow, dayCondition.dailyChanceOfSnow) &&
Objects.equals(this.uv, dayCondition.uv);
}
@Override
public int hashCode() {
return Objects.hash(maxtempC, maxtempF, mintempC, mintempF, avgtempC, avgtempF, maxwindMph, maxwindKph,
totalprecipMm, totalprecipIn, avgvisKm, avgvisMiles, avghumidity, dailyWillItRain, dailyChanceOfRain,
dailyWillItSnow, dailyChanceOfSnow, uv);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DayCondition {\n");
sb.append(" maxtempC: ").append(toIndentedString(maxtempC)).append("\n");
sb.append(" maxtempF: ").append(toIndentedString(maxtempF)).append("\n");
sb.append(" mintempC: ").append(toIndentedString(mintempC)).append("\n");
sb.append(" mintempF: ").append(toIndentedString(mintempF)).append("\n");
sb.append(" avgtempC: ").append(toIndentedString(avgtempC)).append("\n");
sb.append(" avgtempF: ").append(toIndentedString(avgtempF)).append("\n");
sb.append(" maxwindMph: ").append(toIndentedString(maxwindMph)).append("\n");
sb.append(" maxwindKph: ").append(toIndentedString(maxwindKph)).append("\n");
sb.append(" totalprecipMm: ").append(toIndentedString(totalprecipMm)).append("\n");
sb.append(" totalprecipIn: ").append(toIndentedString(totalprecipIn)).append("\n");
sb.append(" avgvisKm: ").append(toIndentedString(avgvisKm)).append("\n");
sb.append(" avgvisMiles: ").append(toIndentedString(avgvisMiles)).append("\n");
sb.append(" avghumidity: ").append(toIndentedString(avghumidity)).append("\n");
sb.append(" dailyWillItRain: ").append(toIndentedString(dailyWillItRain)).append("\n");
sb.append(" dailyChanceOfRain: ").append(toIndentedString(dailyChanceOfRain)).append("\n");
sb.append(" dailyWillItSnow: ").append(toIndentedString(dailyWillItSnow)).append("\n");
sb.append(" dailyChanceOfSnow: ").append(toIndentedString(dailyChanceOfSnow)).append("\n");
sb.append(" uv: ").append(toIndentedString(uv)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.*;
/**
* ForecastDay
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-06T14:20:51.790816423Z[GMT]")
@JsonInclude(Include.NON_NULL)
public class ForecastDay {
@JsonProperty("date")
private String date = null;
@JsonProperty("date_epoch")
private Integer dateEpoch = null;
@JsonProperty("day")
private DayCondition day = new DayCondition();
@JsonProperty("astro")
private Astro astro = new Astro();
@JsonProperty("hour")
@Valid
private List<HourCondition> hour = null;
public ForecastDay date(String date) {
this.date = date;
return this;
}
/**
* Get date
*
* @return date
**/
@Schema(description = "")
@NotNull
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public ForecastDay dateEpoch(Integer dateEpoch) {
this.dateEpoch = dateEpoch;
return this;
}
/**
* Get dateEpoch
*
* @return dateEpoch
**/
@Schema(description = "")
@NotNull
public Integer getDateEpoch() {
return dateEpoch;
}
public void setDateEpoch(Integer dateEpoch) {
this.dateEpoch = dateEpoch;
}
public ForecastDay day(DayCondition day) {
this.day = day;
return this;
}
/**
* Get day
*
* @return day
**/
@Schema(description = "")
@NotNull
@Valid
public DayCondition getDay() {
return day;
}
public void setDay(DayCondition day) {
this.day = day;
}
public ForecastDay astro(Astro astro) {
this.astro = astro;
return this;
}
/**
* Get astro
*
* @return astro
**/
@Schema(description = "")
@NotNull
@Valid
public Astro getAstro() {
return astro;
}
public void setAstro(Astro astro) {
this.astro = astro;
}
public ForecastDay hour(List<HourCondition> hour) {
this.hour = hour;
return this;
}
public ForecastDay addHourItem(HourCondition hourItem) {
if (this.hour == null) {
this.hour = new ArrayList<HourCondition>();
}
this.hour.add(hourItem);
return this;
}
/**
* Get hour
*
* @return hour
**/
@Schema(description = "")
@NotNull
@Valid
public List<HourCondition> getHour() {
return hour;
}
public void setHour(List<HourCondition> hour) {
this.hour = hour;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ForecastDay forecastDay = (ForecastDay) o;
return Objects.equals(this.date, forecastDay.date) &&
Objects.equals(this.dateEpoch, forecastDay.dateEpoch) &&
Objects.equals(this.day, forecastDay.day) &&
Objects.equals(this.astro, forecastDay.astro) &&
Objects.equals(this.hour, forecastDay.hour);
}
@Override
public int hashCode() {
return Objects.hash(date, dateEpoch, day, astro, hour);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ForecastDay {\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateEpoch: ").append(toIndentedString(dateEpoch)).append("\n");
sb.append(" day: ").append(toIndentedString(day)).append("\n");
sb.append(" astro: ").append(toIndentedString(astro)).append("\n");
sb.append(" hour: ").append(toIndentedString(hour)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.*;
/**
* HourCondition
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-06T14:20:51.790816423Z[GMT]")
@JsonInclude(Include.NON_NULL)
public class HourCondition {
@JsonProperty("time_epoch")
private Integer timeEpoch = null;
@JsonProperty("time")
private String time = null;
@JsonProperty("temp_c")
private Float tempC = null;
@JsonProperty("temp_f")
private Float tempF = null;
@JsonProperty("is_day")
private Integer isDay = null;
@JsonProperty("wind_mph")
private Float windMph = null;
@JsonProperty("wind_kph")
private Float windKph = null;
@JsonProperty("wind_degree")
private Integer windDegree = null;
@JsonProperty("wind_dir")
private String windDir = null;
@JsonProperty("pressure_mb")
private Float pressureMb = null;
@JsonProperty("pressure_in")
private Float pressureIn = null;
@JsonProperty("precip_mm")
private Float precipMm = null;
@JsonProperty("precip_in")
private Float precipIn = null;
@JsonProperty("humidity")
private Integer humidity = null;
@JsonProperty("cloud")
private Integer cloud = null;
@JsonProperty("feelslike_c")
private Float feelslikeC = null;
@JsonProperty("feelslike_f")
private Float feelslikeF = null;
@JsonProperty("windchill_c")
private Float windchillC = null;
@JsonProperty("windchill_f")
private Float windchillF = null;
@JsonProperty("heatindex_c")
private Float heatindexC = null;
@JsonProperty("heatindex_f")
private Float heatindexF = null;
@JsonProperty("dewpoint_c")
private Float dewpointC = null;
@JsonProperty("dewpoint_f")
private Float dewpointF = null;
@JsonProperty("will_it_rain")
private Integer willItRain = null;
@JsonProperty("chance_of_rain")
private Integer chanceOfRain = null;
@JsonProperty("will_it_snow")
private Integer willItSnow = null;
@JsonProperty("chance_of_snow")
private Integer chanceOfSnow = null;
@JsonProperty("vis_km")
private Float visKm = null;
@JsonProperty("vis_miles")
private Float visMiles = null;
@JsonProperty("gust_mph")
private Float gustMph = null;
@JsonProperty("gust_kph")
private Float gustKph = null;
@JsonProperty("uv")
private Float uv = null;
public HourCondition timeEpoch(Integer timeEpoch) {
this.timeEpoch = timeEpoch;
return this;
}
/**
* Get timeEpoch
*
* @return timeEpoch
**/
@Schema(description = "")
@NotNull
public Integer getTimeEpoch() {
return timeEpoch;
}
public void setTimeEpoch(Integer timeEpoch) {
this.timeEpoch = timeEpoch;
}
public HourCondition time(String time) {
this.time = time;
return this;
}
/**
* Get time
*
* @return time
**/
@Schema(description = "")
@NotNull
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public HourCondition tempC(Float tempC) {
this.tempC = tempC;
return this;
}
/**
* Get tempC
*
* @return tempC
**/
@Schema(description = "")
@NotNull
public Float getTempC() {
return tempC;
}
public void setTempC(Float tempC) {
this.tempC = tempC;
}
public HourCondition tempF(Float tempF) {
this.tempF = tempF;
return this;
}
/**
* Get tempF
*
* @return tempF
**/
@Schema(description = "")
@NotNull
public Float getTempF() {
return tempF;
}
public void setTempF(Float tempF) {
this.tempF = tempF;
}
public HourCondition isDay(Integer isDay) {
this.isDay = isDay;
return this;
}
/**
* Get isDay
*
* @return isDay
**/
@Schema(description = "")
@NotNull
public Integer getIsDay() {
return isDay;
}
public void setIsDay(Integer isDay) {
this.isDay = isDay;
}
public HourCondition windMph(Float windMph) {
this.windMph = windMph;
return this;
}
/**
* Get windMph
*
* @return windMph
**/
@Schema(description = "")
@NotNull
public Float getWindMph() {
return windMph;
}
public void setWindMph(Float windMph) {
this.windMph = windMph;
}
public HourCondition windKph(Float windKph) {
this.windKph = windKph;
return this;
}
/**
* Get windKph
*
* @return windKph
**/
@Schema(description = "")
@NotNull
public Float getWindKph() {
return windKph;
}
public void setWindKph(Float windKph) {
this.windKph = windKph;
}
public HourCondition windDegree(Integer windDegree) {
this.windDegree = windDegree;
return this;
}
/**
* Get windDegree
*
* @return windDegree
**/
@Schema(description = "")
@NotNull
public Integer getWindDegree() {
return windDegree;
}
public void setWindDegree(Integer windDegree) {
this.windDegree = windDegree;
}
public HourCondition windDir(String windDir) {
this.windDir = windDir;
return this;
}
/**
* Get windDir
*
* @return windDir
**/
@Schema(description = "")
@NotNull
public String getWindDir() {
return windDir;
}
public void setWindDir(String windDir) {
this.windDir = windDir;
}
public HourCondition pressureMb(Float pressureMb) {
this.pressureMb = pressureMb;
return this;
}
/**
* Get pressureMb
*
* @return pressureMb
**/
@Schema(description = "")
@NotNull
public Float getPressureMb() {
return pressureMb;
}
public void setPressureMb(Float pressureMb) {
this.pressureMb = pressureMb;
}
public HourCondition pressureIn(Float pressureIn) {
this.pressureIn = pressureIn;
return this;
}
/**
* Get pressureIn
*
* @return pressureIn
**/
@Schema(description = "")
@NotNull
public Float getPressureIn() {
return pressureIn;
}
public void setPressureIn(Float pressureIn) {
this.pressureIn = pressureIn;
}
public HourCondition precipMm(Float precipMm) {
this.precipMm = precipMm;
return this;
}
/**
* Get precipMm
*
* @return precipMm
**/
@Schema(description = "")
@NotNull
public Float getPrecipMm() {
return precipMm;
}
public void setPrecipMm(Float precipMm) {
this.precipMm = precipMm;
}
public HourCondition precipIn(Float precipIn) {
this.precipIn = precipIn;
return this;
}
/**
* Get precipIn
*
* @return precipIn
**/
@Schema(description = "")
@NotNull
public Float getPrecipIn() {
return precipIn;
}
public void setPrecipIn(Float precipIn) {
this.precipIn = precipIn;
}
public HourCondition humidity(Integer humidity) {
this.humidity = humidity;
return this;
}
/**
* Get humidity
*
* @return humidity
**/
@Schema(description = "")
@NotNull
public Integer getHumidity() {
return humidity;
}
public void setHumidity(Integer humidity) {
this.humidity = humidity;
}
public HourCondition cloud(Integer cloud) {
this.cloud = cloud;
return this;
}
/**
* Get cloud
*
* @return cloud
**/
@Schema(description = "")
@NotNull
public Integer getCloud() {
return cloud;
}
public void setCloud(Integer cloud) {
this.cloud = cloud;
}
public HourCondition feelslikeC(Float feelslikeC) {
this.feelslikeC = feelslikeC;
return this;
}
/**
* Get feelslikeC
*
* @return feelslikeC
**/
@Schema(description = "")
@NotNull
public Float getFeelslikeC() {
return feelslikeC;
}
public void setFeelslikeC(Float feelslikeC) {
this.feelslikeC = feelslikeC;
}
public HourCondition feelslikeF(Float feelslikeF) {
this.feelslikeF = feelslikeF;
return this;
}
/**
* Get feelslikeF
*
* @return feelslikeF
**/
@Schema(description = "")
@NotNull
public Float getFeelslikeF() {
return feelslikeF;
}
public void setFeelslikeF(Float feelslikeF) {
this.feelslikeF = feelslikeF;
}
public HourCondition windchillC(Float windchillC) {
this.windchillC = windchillC;
return this;
}
/**
* Get windchillC
*
* @return windchillC
**/
@Schema(description = "")
@NotNull
public Float getWindchillC() {
return windchillC;
}
public void setWindchillC(Float windchillC) {
this.windchillC = windchillC;
}
public HourCondition windchillF(Float windchillF) {
this.windchillF = windchillF;
return this;
}
/**
* Get windchillF
*
* @return windchillF
**/
@Schema(description = "")
@NotNull
public Float getWindchillF() {
return windchillF;
}
public void setWindchillF(Float windchillF) {
this.windchillF = windchillF;
}
public HourCondition heatindexC(Float heatindexC) {
this.heatindexC = heatindexC;
return this;
}
/**
* Get heatindexC
*
* @return heatindexC
**/
@Schema(description = "")
@NotNull
public Float getHeatindexC() {
return heatindexC;
}
public void setHeatindexC(Float heatindexC) {
this.heatindexC = heatindexC;
}
public HourCondition heatindexF(Float heatindexF) {
this.heatindexF = heatindexF;
return this;
}
/**
* Get heatindexF
*
* @return heatindexF
**/
@Schema(description = "")
@NotNull
public Float getHeatindexF() {
return heatindexF;
}
public void setHeatindexF(Float heatindexF) {
this.heatindexF = heatindexF;
}
public HourCondition dewpointC(Float dewpointC) {
this.dewpointC = dewpointC;
return this;
}
/**
* Get dewpointC
*
* @return dewpointC
**/
@Schema(description = "")
@NotNull
public Float getDewpointC() {
return dewpointC;
}
public void setDewpointC(Float dewpointC) {
this.dewpointC = dewpointC;
}
public HourCondition dewpointF(Float dewpointF) {
this.dewpointF = dewpointF;
return this;
}
/**
* Get dewpointF
*
* @return dewpointF
**/
@Schema(description = "")
@NotNull
public Float getDewpointF() {
return dewpointF;
}
public void setDewpointF(Float dewpointF) {
this.dewpointF = dewpointF;
}
public HourCondition willItRain(Integer willItRain) {
this.willItRain = willItRain;
return this;
}
/**
* Get willItRain
*
* @return willItRain
**/
@Schema(description = "")
@NotNull
public Integer getWillItRain() {
return willItRain;
}
public void setWillItRain(Integer willItRain) {
this.willItRain = willItRain;
}
public HourCondition chanceOfRain(Integer chanceOfRain) {
this.chanceOfRain = chanceOfRain;
return this;
}
/**
* Get chanceOfRain
*
* @return chanceOfRain
**/
@Schema(description = "")
@NotNull
public Integer getChanceOfRain() {
return chanceOfRain;
}
public void setChanceOfRain(Integer chanceOfRain) {
this.chanceOfRain = chanceOfRain;
}
public HourCondition willItSnow(Integer willItSnow) {
this.willItSnow = willItSnow;
return this;
}
/**
* Get willItSnow
*
* @return willItSnow
**/
@Schema(description = "")
@NotNull
public Integer getWillItSnow() {
return willItSnow;
}
public void setWillItSnow(Integer willItSnow) {
this.willItSnow = willItSnow;
}
public HourCondition chanceOfSnow(Integer chanceOfSnow) {
this.chanceOfSnow = chanceOfSnow;
return this;
}
/**
* Get chanceOfSnow
*
* @return chanceOfSnow
**/
@Schema(description = "")
@NotNull
public Integer getChanceOfSnow() {
return chanceOfSnow;
}
public void setChanceOfSnow(Integer chanceOfSnow) {
this.chanceOfSnow = chanceOfSnow;
}
public HourCondition visKm(Float visKm) {
this.visKm = visKm;
return this;
}
/**
* Get visKm
*
* @return visKm
**/
@Schema(description = "")
@NotNull
public Float getVisKm() {
return visKm;
}
public void setVisKm(Float visKm) {
this.visKm = visKm;
}
public HourCondition visMiles(Float visMiles) {
this.visMiles = visMiles;
return this;
}
/**
* Get visMiles
*
* @return visMiles
**/
@Schema(description = "")
@NotNull
public Float getVisMiles() {
return visMiles;
}
public void setVisMiles(Float visMiles) {
this.visMiles = visMiles;
}
public HourCondition gustMph(Float gustMph) {
this.gustMph = gustMph;
return this;
}
/**
* Get gustMph
*
* @return gustMph
**/
@Schema(description = "")
@NotNull
public Float getGustMph() {
return gustMph;
}
public void setGustMph(Float gustMph) {
this.gustMph = gustMph;
}
public HourCondition gustKph(Float gustKph) {
this.gustKph = gustKph;
return this;
}
/**
* Get gustKph
*
* @return gustKph
**/
@Schema(description = "")
@NotNull
public Float getGustKph() {
return gustKph;
}
public void setGustKph(Float gustKph) {
this.gustKph = gustKph;
}
public HourCondition uv(Float uv) {
this.uv = uv;
return this;
}
/**
* Get uv
*
* @return uv
**/
@Schema(description = "")
@NotNull
public Float getUv() {
return uv;
}
public void setUv(Float uv) {
this.uv = uv;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HourCondition hourCondition = (HourCondition) o;
return Objects.equals(this.timeEpoch, hourCondition.timeEpoch) &&
Objects.equals(this.time, hourCondition.time) &&
Objects.equals(this.tempC, hourCondition.tempC) &&
Objects.equals(this.tempF, hourCondition.tempF) &&
Objects.equals(this.isDay, hourCondition.isDay) &&
Objects.equals(this.windMph, hourCondition.windMph) &&
Objects.equals(this.windKph, hourCondition.windKph) &&
Objects.equals(this.windDegree, hourCondition.windDegree) &&
Objects.equals(this.windDir, hourCondition.windDir) &&
Objects.equals(this.pressureMb, hourCondition.pressureMb) &&
Objects.equals(this.pressureIn, hourCondition.pressureIn) &&
Objects.equals(this.precipMm, hourCondition.precipMm) &&
Objects.equals(this.precipIn, hourCondition.precipIn) &&
Objects.equals(this.humidity, hourCondition.humidity) &&
Objects.equals(this.cloud, hourCondition.cloud) &&
Objects.equals(this.feelslikeC, hourCondition.feelslikeC) &&
Objects.equals(this.feelslikeF, hourCondition.feelslikeF) &&
Objects.equals(this.windchillC, hourCondition.windchillC) &&
Objects.equals(this.windchillF, hourCondition.windchillF) &&
Objects.equals(this.heatindexC, hourCondition.heatindexC) &&
Objects.equals(this.heatindexF, hourCondition.heatindexF) &&
Objects.equals(this.dewpointC, hourCondition.dewpointC) &&
Objects.equals(this.dewpointF, hourCondition.dewpointF) &&
Objects.equals(this.willItRain, hourCondition.willItRain) &&
Objects.equals(this.chanceOfRain, hourCondition.chanceOfRain) &&
Objects.equals(this.willItSnow, hourCondition.willItSnow) &&
Objects.equals(this.chanceOfSnow, hourCondition.chanceOfSnow) &&
Objects.equals(this.visKm, hourCondition.visKm) &&
Objects.equals(this.visMiles, hourCondition.visMiles) &&
Objects.equals(this.gustMph, hourCondition.gustMph) &&
Objects.equals(this.gustKph, hourCondition.gustKph) &&
Objects.equals(this.uv, hourCondition.uv);
}
@Override
public int hashCode() {
return Objects.hash(timeEpoch, time, tempC, tempF, isDay, windMph,
windKph, windDegree, windDir, pressureMb, pressureIn, precipMm,
precipIn, humidity, cloud, feelslikeC, feelslikeF, windchillC,
windchillF, heatindexC, heatindexF, dewpointC, dewpointF, willItRain,
chanceOfRain, willItSnow, chanceOfSnow, visKm, visMiles, gustMph,
gustKph, uv);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HourCondition {\n");
sb.append(" timeEpoch: ").append(toIndentedString(timeEpoch)).append("\n");
sb.append(" time: ").append(toIndentedString(time)).append("\n");
sb.append(" tempC: ").append(toIndentedString(tempC)).append("\n");
sb.append(" tempF: ").append(toIndentedString(tempF)).append("\n");
sb.append(" isDay: ").append(toIndentedString(isDay)).append("\n");
sb.append(" windMph: ").append(toIndentedString(windMph)).append("\n");
sb.append(" windKph: ").append(toIndentedString(windKph)).append("\n");
sb.append(" windDegree: ").append(toIndentedString(windDegree)).append("\n");
sb.append(" windDir: ").append(toIndentedString(windDir)).append("\n");
sb.append(" pressureMb: ").append(toIndentedString(pressureMb)).append("\n");
sb.append(" pressureIn: ").append(toIndentedString(pressureIn)).append("\n");
sb.append(" precipMm: ").append(toIndentedString(precipMm)).append("\n");
sb.append(" precipIn: ").append(toIndentedString(precipIn)).append("\n");
sb.append(" humidity: ").append(toIndentedString(humidity)).append("\n");
sb.append(" cloud: ").append(toIndentedString(cloud)).append("\n");
sb.append(" feelslikeC: ").append(toIndentedString(feelslikeC)).append("\n");
sb.append(" feelslikeF: ").append(toIndentedString(feelslikeF)).append("\n");
sb.append(" windchillC: ").append(toIndentedString(windchillC)).append("\n");
sb.append(" windchillF: ").append(toIndentedString(windchillF)).append("\n");
sb.append(" heatindexC: ").append(toIndentedString(heatindexC)).append("\n");
sb.append(" heatindexF: ").append(toIndentedString(heatindexF)).append("\n");
sb.append(" dewpointC: ").append(toIndentedString(dewpointC)).append("\n");
sb.append(" dewpointF: ").append(toIndentedString(dewpointF)).append("\n");
sb.append(" willItRain: ").append(toIndentedString(willItRain)).append("\n");
sb.append(" chanceOfRain: ").append(toIndentedString(chanceOfRain)).append("\n");
sb.append(" willItSnow: ").append(toIndentedString(willItSnow)).append("\n");
sb.append(" chanceOfSnow: ").append(toIndentedString(chanceOfSnow)).append("\n");
sb.append(" visKm: ").append(toIndentedString(visKm)).append("\n");
sb.append(" visMiles: ").append(toIndentedString(visMiles)).append("\n");
sb.append(" gustMph: ").append(toIndentedString(gustMph)).append("\n");
sb.append(" gustKph: ").append(toIndentedString(gustKph)).append("\n");
sb.append(" uv: ").append(toIndentedString(uv)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.*;
/**
* InlineResponse200
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-08T14:34:21.706302463Z[GMT]")
@JsonInclude(Include.NON_NULL)
public class InlineResponse200 {
@JsonProperty("latitude")
private Float latitude = null;
@JsonProperty("longitude")
private Float longitude = null;
@JsonProperty("generationtime_ms")
private Float generationtimeMs = null;
@JsonProperty("utc_offset_seconds")
private Integer utcOffsetSeconds = null;
@JsonProperty("timezone")
private String timezone = null;
@JsonProperty("timezone_abbreviation")
private String timezoneAbbreviation = null;
@JsonProperty("elevation")
private Integer elevation = null;
@JsonProperty("hourly_units")
private Object hourlyUnits = null;
@JsonProperty("hourly")
private Object hourly = null;
@JsonProperty("daily_units")
private Object dailyUnits = null;
@JsonProperty("daily")
private Object daily = null;
public InlineResponse200 latitude(Float latitude) {
this.latitude = latitude;
return this;
}
/**
* Get latitude
*
* @return latitude
**/
@Schema(description = "")
@NotNull
public Float getLatitude() {
return latitude;
}
public void setLatitude(Float latitude) {
this.latitude = latitude;
}
public InlineResponse200 longitude(Float longitude) {
this.longitude = longitude;
return this;
}
/**
* Get longitude
*
* @return longitude
**/
@Schema(description = "")
@NotNull
public Float getLongitude() {
return longitude;
}
public void setLongitude(Float longitude) {
this.longitude = longitude;
}
public InlineResponse200 generationtimeMs(Float generationtimeMs) {
this.generationtimeMs = generationtimeMs;
return this;
}
/**
* Get generationtimeMs
*
* @return generationtimeMs
**/
@Schema(description = "")
@NotNull
public Float getGenerationtimeMs() {
return generationtimeMs;
}
public void setGenerationtimeMs(Float generationtimeMs) {
this.generationtimeMs = generationtimeMs;
}
public InlineResponse200 utcOffsetSeconds(Integer utcOffsetSeconds) {
this.utcOffsetSeconds = utcOffsetSeconds;
return this;
}
/**
* Get utcOffsetSeconds
*
* @return utcOffsetSeconds
**/
@Schema(description = "")
@NotNull
public Integer getUtcOffsetSeconds() {
return utcOffsetSeconds;
}
public void setUtcOffsetSeconds(Integer utcOffsetSeconds) {
this.utcOffsetSeconds = utcOffsetSeconds;
}
public InlineResponse200 timezone(String timezone) {
this.timezone = timezone;
return this;
}
/**
* Get timezone
*
* @return timezone
**/
@Schema(description = "")
@NotNull
public String getTimezone() {
return timezone;
}
public void setTimezone(String timezone) {
this.timezone = timezone;
}
public InlineResponse200 timezoneAbbreviation(String timezoneAbbreviation) {
this.timezoneAbbreviation = timezoneAbbreviation;
return this;
}
/**
* Get timezoneAbbreviation
*
* @return timezoneAbbreviation
**/
@Schema(description = "")
@NotNull
public String getTimezoneAbbreviation() {
return timezoneAbbreviation;
}
public void setTimezoneAbbreviation(String timezoneAbbreviation) {
this.timezoneAbbreviation = timezoneAbbreviation;
}
public InlineResponse200 elevation(Integer elevation) {
this.elevation = elevation;
return this;
}
/**
* Get elevation
*
* @return elevation
**/
@Schema(description = "")
@NotNull
public Integer getElevation() {
return elevation;
}
public void setElevation(Integer elevation) {
this.elevation = elevation;
}
public InlineResponse200 hourlyUnits(Object hourlyUnits) {
this.hourlyUnits = hourlyUnits;
return this;
}
/**
* Get hourlyUnits
*
* @return hourlyUnits
**/
@Schema(description = "")
@NotNull
public Object getHourlyUnits() {
return hourlyUnits;
}
public void setHourlyUnits(Object hourlyUnits) {
this.hourlyUnits = hourlyUnits;
}
public InlineResponse200 hourly(Object hourly) {
this.hourly = hourly;
return this;
}
/**
* Get hourly
*
* @return hourly
**/
@Schema(description = "")
@NotNull
public Object getHourly() {
return hourly;
}
public void setHourly(Object hourly) {
this.hourly = hourly;
}
public InlineResponse200 dailyUnits(Object dailyUnits) {
this.dailyUnits = dailyUnits;
return this;
}
/**
* Get dailyUnits
*
* @return dailyUnits
**/
@Schema(description = "")
@NotNull
public Object getDailyUnits() {
return dailyUnits;
}
public void setDailyUnits(Object dailyUnits) {
this.dailyUnits = dailyUnits;
}
public InlineResponse200 daily(Object daily) {
this.daily = daily;
return this;
}
/**
* Get daily
*
* @return daily
**/
@Schema(description = "")
@NotNull
public Object getDaily() {
return daily;
}
public void setDaily(Object daily) {
this.daily = daily;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
return Objects.equals(this.latitude, inlineResponse200.latitude) &&
Objects.equals(this.longitude, inlineResponse200.longitude) &&
Objects.equals(this.generationtimeMs, inlineResponse200.generationtimeMs) &&
Objects.equals(this.utcOffsetSeconds, inlineResponse200.utcOffsetSeconds) &&
Objects.equals(this.timezone, inlineResponse200.timezone) &&
Objects.equals(this.timezoneAbbreviation, inlineResponse200.timezoneAbbreviation) &&
Objects.equals(this.elevation, inlineResponse200.elevation) &&
Objects.equals(this.hourlyUnits, inlineResponse200.hourlyUnits) &&
Objects.equals(this.hourly, inlineResponse200.hourly) &&
Objects.equals(this.dailyUnits, inlineResponse200.dailyUnits) &&
Objects.equals(this.daily, inlineResponse200.daily);
}
@Override
public int hashCode() {
return Objects.hash(latitude, longitude, generationtimeMs, utcOffsetSeconds, timezone, timezoneAbbreviation,
elevation, hourlyUnits, hourly, dailyUnits, daily);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n");
sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n");
sb.append(" generationtimeMs: ").append(toIndentedString(generationtimeMs)).append("\n");
sb.append(" utcOffsetSeconds: ").append(toIndentedString(utcOffsetSeconds)).append("\n");
sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n");
sb.append(" timezoneAbbreviation: ").append(toIndentedString(timezoneAbbreviation)).append("\n");
sb.append(" elevation: ").append(toIndentedString(elevation)).append("\n");
sb.append(" hourlyUnits: ").append(toIndentedString(hourlyUnits)).append("\n");
sb.append(" hourly: ").append(toIndentedString(hourly)).append("\n");
sb.append(" dailyUnits: ").append(toIndentedString(dailyUnits)).append("\n");
sb.append(" daily: ").append(toIndentedString(daily)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.*;
/**
* Location
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-04T09:41:03.559554872Z[GMT]")
@JsonInclude(Include.NON_NULL)
public class Location {
@JsonProperty("name")
private String name = null;
@JsonProperty("region")
private String region = null;
@JsonProperty("country")
private String country = null;
@JsonProperty("lon")
private BigDecimal lon = null;
@JsonProperty("lat")
private BigDecimal lat = null;
@JsonProperty("tz_id")
private String tzId = null;
@JsonProperty("localtime_epoch")
private Integer localtimeEpoch = null;
@JsonProperty("localtime")
private String localtime = null;
public Location name(String name) {
this.name = name;
return this;
}
/**
* city name
*
* @return name
**/
@Schema(example = "stuttgart", description = "city name")
@NotNull
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Location region(String region) {
this.region = region;
return this;
}
/**
* region
*
* @return region
**/
@Schema(example = "baden wuerttemberg", description = "region")
@NotNull
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public Location country(String country) {
this.country = country;
return this;
}
/**
* country
*
* @return country
**/
@Schema(example = "Germany", description = "country")
@NotNull
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public Location lon(BigDecimal lon) {
this.lon = lon;
return this;
}
/**
* City geo location, longitude
*
* @return lon
**/
@Schema(example = "48.78", description = "City geo location, longitude")
@NotNull
@Valid
public BigDecimal getLon() {
return lon;
}
public void setLon(BigDecimal lon) {
this.lon = lon;
}
public Location lat(BigDecimal lat) {
this.lat = lat;
return this;
}
/**
* City geo location, latitude
*
* @return lat
**/
@Schema(example = "9.17", description = "City geo location, latitude")
@NotNull
@Valid
public BigDecimal getLat() {
return lat;
}
public void setLat(BigDecimal lat) {
this.lat = lat;
}
public Location tzId(String tzId) {
this.tzId = tzId;
return this;
}
/**
* timezone id
*
* @return tzId
**/
@Schema(example = "europa/berlin", description = "timezone id")
@NotNull
public String getTzId() {
return tzId;
}
public void setTzId(String tzId) {
this.tzId = tzId;
}
public Location localtimeEpoch(Integer localtimeEpoch) {
this.localtimeEpoch = localtimeEpoch;
return this;
}
/**
* unix time
*
* @return localtimeEpoch
**/
@Schema(example = "1717491434", description = "unix time")
@NotNull
public Integer getLocaltimeEpoch() {
return localtimeEpoch;
}
public void setLocaltimeEpoch(Integer localtimeEpoch) {
this.localtimeEpoch = localtimeEpoch;
}
public Location localtime(String localtime) {
this.localtime = localtime;
return this;
}
/**
* current time
*
* @return localtime
**/
@Schema(example = "2001-10-09 10:07", description = "current time")
@NotNull
public String getLocaltime() {
return localtime;
}
public void setLocaltime(String localtime) {
this.localtime = localtime;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Location location = (Location) o;
return Objects.equals(this.name, location.name) &&
Objects.equals(this.region, location.region) &&
Objects.equals(this.country, location.country) &&
Objects.equals(this.lon, location.lon) &&
Objects.equals(this.lat, location.lat) &&
Objects.equals(this.tzId, location.tzId) &&
Objects.equals(this.localtimeEpoch, location.localtimeEpoch) &&
Objects.equals(this.localtime, location.localtime);
}
@Override
public int hashCode() {
return Objects.hash(name, region, country, lon, lat, tzId, localtimeEpoch, localtime);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Location {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" region: ").append(toIndentedString(region)).append("\n");
sb.append(" country: ").append(toIndentedString(country)).append("\n");
sb.append(" lon: ").append(toIndentedString(lon)).append("\n");
sb.append(" lat: ").append(toIndentedString(lat)).append("\n");
sb.append(" tzId: ").append(toIndentedString(tzId)).append("\n");
sb.append(" localtimeEpoch: ").append(toIndentedString(localtimeEpoch)).append("\n");
sb.append(" localtime: ").append(toIndentedString(localtime)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.*;
/**
* Model200
*/
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-04T09:41:03.559554872Z[GMT]")
@JsonInclude(Include.NON_NULL)
public class Model200 {
@JsonProperty("location")
private Location location = new Location();
@JsonProperty("current")
private Current current = new Current();
public Model200 location(Location location) {
this.location = location;
return this;
}
/**
* Get location
*
* @return location
**/
@Schema(description = "")
@NotNull
@Valid
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
public Model200 current(Current current) {
this.current = current;
return this;
}
/**
* Get current
*
* @return current
**/
@Schema(description = "")
@NotNull
@Valid
public Current getCurrent() {
return current;
}
public void setCurrent(Current current) {
this.current = current;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Model200 _200 = (Model200) o;
return Objects.equals(this.location, _200.location) &&
Objects.equals(this.current, _200.current);
}
@Override
public int hashCode() {
return Objects.hash(location, current);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Model200 {\n");
sb.append(" location: ").append(toIndentedString(location)).append("\n");
sb.append(" current: ").append(toIndentedString(current)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment