@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDsResponse extends Object implements DsResponse
DsResponse.
Use the builder to create immutable instances:
ImmutableDsResponse.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableDsResponse.Builder
Builds instances of type
ImmutableDsResponse. |
| Modifier and Type | Method and Description |
|---|---|
List<DsAlert> |
alerts()
A list of
DsAlert instances, which, if present, contains any severe weather
alerts pertinent to the requested location. |
static ImmutableDsResponse.Builder |
builder()
Creates a builder for
ImmutableDsResponse. |
static ImmutableDsResponse |
copyOf(DsResponse instance)
Creates an immutable copy of a
DsResponse value. |
DsDataPoint |
currently()
A
DsDataPoint containing the current weather conditions at the requested
location. |
DsDataBlock |
daily()
A
DsDataBlock containing the weather conditions day-by-day for the next
week. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableDsResponse that have equal attribute values. |
DsFlag |
flags()
A
DsFlag object containing miscellaneous metadata about the request. |
int |
hashCode()
Computes a hash code from attributes:
latitude, longitude, timezone, offset, currently, minutely, hourly, daily, alerts, flags. |
DsDataBlock |
hourly()
A
DsDataBlock containing the weather conditions hour-by-hour for the next
two days. |
BigDecimal |
latitude()
The requested latitude.
|
BigDecimal |
longitude()
The requested longitude.
|
DsDataBlock |
minutely()
A
DsDataBlock containing the weather conditions minute-by-minute for the
next hour. |
int |
offset()
Deprecated.
|
String |
timezone()
The IANA timezone name for the requested location.
|
String |
toString()
Prints the immutable value
DsResponse with attribute values. |
ImmutableDsResponse |
withAlerts(DsAlert... elements)
Copy the current immutable object with elements that replace the content of
alerts. |
ImmutableDsResponse |
withAlerts(Iterable<? extends DsAlert> elements)
Copy the current immutable object with elements that replace the content of
alerts. |
ImmutableDsResponse |
withCurrently(DsDataPoint value)
Copy the current immutable object by setting a value for the
currently attribute. |
ImmutableDsResponse |
withDaily(DsDataBlock value)
Copy the current immutable object by setting a value for the
daily attribute. |
ImmutableDsResponse |
withFlags(DsFlag value)
Copy the current immutable object by setting a value for the
flags attribute. |
ImmutableDsResponse |
withHourly(DsDataBlock value)
Copy the current immutable object by setting a value for the
hourly attribute. |
ImmutableDsResponse |
withLatitude(BigDecimal value)
Copy the current immutable object by setting a value for the
latitude attribute. |
ImmutableDsResponse |
withLongitude(BigDecimal value)
Copy the current immutable object by setting a value for the
longitude attribute. |
ImmutableDsResponse |
withMinutely(DsDataBlock value)
Copy the current immutable object by setting a value for the
minutely attribute. |
ImmutableDsResponse |
withOffset(int value)
Deprecated.
|
ImmutableDsResponse |
withTimezone(String value)
Copy the current immutable object by setting a value for the
timezone attribute. |
public BigDecimal latitude()
latitude in interface DsResponsepublic BigDecimal longitude()
longitude in interface DsResponsepublic String timezone()
DsDataPoint.summary() and for determining when hourly() and
daily() data block objects begin.timezone in interface DsResponse@Deprecated public int offset()
offset in interface DsResponse@Nullable public DsDataPoint currently()
DsDataPoint containing the current weather conditions at the requested
location.currently in interface DsResponse@Nullable public DsDataBlock minutely()
DsDataBlock containing the weather conditions minute-by-minute for the
next hour.minutely in interface DsResponse@Nullable public DsDataBlock hourly()
DsDataBlock containing the weather conditions hour-by-hour for the next
two days.hourly in interface DsResponse@Nullable public DsDataBlock daily()
DsDataBlock containing the weather conditions day-by-day for the next
week.daily in interface DsResponsepublic List<DsAlert> alerts()
DsAlert instances, which, if present, contains any severe weather
alerts pertinent to the requested location.alerts in interface DsResponse@Nullable public DsFlag flags()
DsFlag object containing miscellaneous metadata about the request.flags in interface DsResponsepublic final ImmutableDsResponse withLatitude(BigDecimal value)
latitude attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for latitudethis objectpublic final ImmutableDsResponse withLongitude(BigDecimal value)
longitude attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for longitudethis objectpublic final ImmutableDsResponse withTimezone(String value)
timezone attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for timezonethis object@Deprecated public final ImmutableDsResponse withOffset(int value)
offset attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for offsetthis objectpublic final ImmutableDsResponse withCurrently(@Nullable DsDataPoint value)
currently attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for currently (can be null)this objectpublic final ImmutableDsResponse withMinutely(@Nullable DsDataBlock value)
minutely attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for minutely (can be null)this objectpublic final ImmutableDsResponse withHourly(@Nullable DsDataBlock value)
hourly attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for hourly (can be null)this objectpublic final ImmutableDsResponse withDaily(@Nullable DsDataBlock value)
daily attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for daily (can be null)this objectpublic final ImmutableDsResponse withAlerts(DsAlert... elements)
alerts.elements - The elements to setthis objectpublic final ImmutableDsResponse withAlerts(Iterable<? extends DsAlert> elements)
alerts.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of alerts elements to setthis objectpublic final ImmutableDsResponse withFlags(@Nullable DsFlag value)
flags attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for flags (can be null)this objectpublic boolean equals(@Nullable Object another)
ImmutableDsResponse that have equal attribute values.public int hashCode()
latitude, longitude, timezone, offset, currently, minutely, hourly, daily, alerts, flags.public String toString()
DsResponse with attribute values.public static ImmutableDsResponse copyOf(DsResponse instance)
DsResponse value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableDsResponse.Builder builder()
ImmutableDsResponse.
ImmutableDsResponse.builder()
.latitude(java.math.BigDecimal) // required latitude
.longitude(java.math.BigDecimal) // required longitude
.timezone(String) // required timezone
.offset(int) // required offset
.currently(ch.rasc.darksky.model.DsDataPoint | null) // nullable currently
.minutely(ch.rasc.darksky.model.DsDataBlock | null) // nullable minutely
.hourly(ch.rasc.darksky.model.DsDataBlock | null) // nullable hourly
.daily(ch.rasc.darksky.model.DsDataBlock | null) // nullable daily
.addAlerts|addAllAlerts(ch.rasc.darksky.model.DsAlert) // alerts elements
.flags(ch.rasc.darksky.model.DsFlag | null) // nullable flags
.build();
Copyright © 2016–2020. All rights reserved.