public abstract class MapboxShield extends DirectionsJsonObject
BannerComponents which includes a snippet of the route shield associated
with the instruction. In cases where data is available, a base url will be provided to help in
constructing an actual URL that can then be used to fetch a shield in the form of SVG.
To receive this information, your request must have
MapboxDirections.Builder#bannerInstructions() set to true.| Modifier and Type | Class and Description |
|---|---|
static class |
MapboxShield.Builder
This builder can be used to set the values describing the
MapboxShield. |
| Constructor and Description |
|---|
MapboxShield() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
baseUrl()
Base url to query the styles endpoint.
|
static MapboxShield.Builder |
builder()
Create a new instance of this class by using the
MapboxShield.Builder class. |
abstract java.lang.String |
displayRef()
String indicating the display ref.
|
static MapboxShield |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
abstract java.lang.String |
name()
String indicating the name of the route shield.
|
abstract java.lang.String |
textColor()
String indicating the color of the text to be rendered on the route shield.
|
abstract MapboxShield.Builder |
toBuilder()
Convert the current
MapboxShield to its builder holding the currently assigned
values. |
static com.google.gson.TypeAdapter<MapboxShield> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
getUnrecognizedJsonProperties, getUnrecognizedPropertiesNames, getUnrecognizedProperty, toJsonpublic static MapboxShield.Builder builder()
MapboxShield.Builder class.MapboxShield.Builder for creating a new instance@SerializedName(value="base_url") public abstract java.lang.String baseUrl()
public abstract java.lang.String name()
@SerializedName(value="text_color") public abstract java.lang.String textColor()
@SerializedName(value="display_ref") public abstract java.lang.String displayRef()
public abstract MapboxShield.Builder toBuilder()
MapboxShield to its builder holding the currently assigned
values. This allows you to modify a single property and then rebuild the object resulting in
an updated and modified MapboxShield.MapboxShield.Builder with the same values set to match the ones defined
in this MapboxShieldpublic static com.google.gson.TypeAdapter<MapboxShield> typeAdapter(com.google.gson.Gson gson)
gson - the built Gson objectpublic static MapboxShield fromJson(java.lang.String json)
json - a formatted valid JSON string defining a MapboxShield