public enum StravaResourceState extends Enum<StravaResourceState> implements StravaReferenceType<Integer>
State of a resource returned from Strava.
| Enum Constant and Description |
|---|
DETAILED
This is a detailed representation of the resource
|
META
This is a representation of the resource which contains the id ONLY (other than the resource state)
|
PRIVATE
Indicates that the resource is flagged as PRIVATE and as a result is not accessible.
|
SUMMARY
This is a summary representation of the resource
|
UNKNOWN
Should never occur but may if Strava API behaviour has changed
|
UPDATING
Resource is currently being updated
|
| Modifier and Type | Method and Description |
|---|---|
static StravaResourceState |
create(Integer id)
Used by JSON deserialisation
|
String |
getDescription() |
Integer |
getId() |
Integer |
getValue()
Used by JSON serialisation
|
String |
toString() |
static StravaResourceState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StravaResourceState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StravaResourceState UPDATING
public static final StravaResourceState META
public static final StravaResourceState SUMMARY
public static final StravaResourceState DETAILED
public static final StravaResourceState PRIVATE
Indicates that the resource is flagged as PRIVATE and as a result is not accessible.
Will be returned as an empty object with only the id and resourceState set.
public static final StravaResourceState UNKNOWN
Should never occur but may if Strava API behaviour has changed
public static StravaResourceState[] values()
for (StravaResourceState c : StravaResourceState.values()) System.out.println(c);
public static StravaResourceState valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static StravaResourceState create(Integer id)
id - The integer representation of this StravaResourceState as returned by the Strava APIStravaResourceState, or UNKNOWN if there is no matchpublic String getDescription()
getDescription in interface StravaReferenceType<Integer>public Integer getId()
getId in interface StravaReferenceType<Integer>public Integer getValue()
getValue in interface StravaReferenceType<Integer>StravaResourceState to be used with the Strava APIResourceStateSerializer.serialize(StravaResourceState, java.lang.reflect.Type, com.google.gson.JsonSerializationContext)public String toString()
toString in interface StravaReferenceType<Integer>toString in class Enum<StravaResourceState>Enum.toString()Copyright © 2016 Dan Shannon. All rights reserved.