@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDsAlert extends Object implements DsAlert
DsAlert.
Use the builder to create immutable instances:
ImmutableDsAlert.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableDsAlert.Builder
Builds instances of type
ImmutableDsAlert. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableDsAlert.Builder |
builder()
Creates a builder for
ImmutableDsAlert. |
static ImmutableDsAlert |
copyOf(DsAlert instance)
Creates an immutable copy of a
DsAlert value. |
String |
description()
A detailed description of the alert.
|
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableDsAlert that have equal attribute values. |
long |
expires()
The UNIX time at which the alert will expire.
|
int |
hashCode()
Computes a hash code from attributes:
description, expires, regions, severity, time, title, uri. |
List<String> |
regions()
A list of
String representing the names of the regions covered by this
weather alert. |
DsAlertSeverity |
severity()
The severity of the weather alert.
|
long |
time()
The UNIX time at which the alert was issued.
|
String |
title()
A brief description of the alert.
|
String |
toString()
Prints the immutable value
DsAlert with attribute values. |
String |
uri()
An HTTP(S) URI that one may refer to for detailed information about the alert.
|
ImmutableDsAlert |
withDescription(String value)
Copy the current immutable object by setting a value for the
description attribute. |
ImmutableDsAlert |
withExpires(long value)
Copy the current immutable object by setting a value for the
expires attribute. |
ImmutableDsAlert |
withRegions(Iterable<String> elements)
Copy the current immutable object with elements that replace the content of
regions. |
ImmutableDsAlert |
withRegions(String... elements)
Copy the current immutable object with elements that replace the content of
regions. |
ImmutableDsAlert |
withSeverity(DsAlertSeverity value)
Copy the current immutable object by setting a value for the
severity attribute. |
ImmutableDsAlert |
withTime(long value)
Copy the current immutable object by setting a value for the
time attribute. |
ImmutableDsAlert |
withTitle(String value)
Copy the current immutable object by setting a value for the
title attribute. |
ImmutableDsAlert |
withUri(String value)
Copy the current immutable object by setting a value for the
uri attribute. |
public String description()
description in interface DsAlertpublic long expires()
public List<String> regions()
String representing the names of the regions covered by this
weather alert.public DsAlertSeverity severity()
DsAlertSeverity.ADVISORY (an individual should be aware of potentially
severe weather), DsAlertSeverity.WATCH (an individual should prepare for
potentially severe weather), or DsAlertSeverity.WARNING (an individual
should take immediate action to protect themselves and others from potentially
severe weather).public long time()
public String title()
public String uri()
public final ImmutableDsAlert withDescription(String value)
description attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for descriptionthis objectpublic final ImmutableDsAlert withExpires(long value)
expires attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for expiresthis objectpublic final ImmutableDsAlert withRegions(String... elements)
regions.elements - The elements to setthis objectpublic final ImmutableDsAlert withRegions(Iterable<String> elements)
regions.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of regions elements to setthis objectpublic final ImmutableDsAlert withSeverity(DsAlertSeverity value)
severity attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for severitythis objectpublic final ImmutableDsAlert withTime(long value)
time attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for timethis objectpublic final ImmutableDsAlert withTitle(String value)
title attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for titlethis objectpublic final ImmutableDsAlert withUri(String value)
uri attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for urithis objectpublic boolean equals(@Nullable Object another)
ImmutableDsAlert that have equal attribute values.public int hashCode()
description, expires, regions, severity, time, title, uri.public String toString()
DsAlert with attribute values.public static ImmutableDsAlert copyOf(DsAlert instance)
DsAlert 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 ImmutableDsAlert.Builder builder()
ImmutableDsAlert.
ImmutableDsAlert.builder()
.description(String) // required description
.expires(long) // required expires
.addRegions|addAllRegions(String) // regions elements
.severity(ch.rasc.darksky.model.DsAlertSeverity) // required severity
.time(long) // required time
.title(String) // required title
.uri(String) // required uri
.build();
Copyright © 2016–2020. All rights reserved.