Package com.twitter.clientlib.model
Class Problem
- java.lang.Object
-
- com.twitter.clientlib.model.Problem
-
- Direct Known Subclasses:
ClientDisconnectedProblem,ClientForbiddenProblem,ConflictProblem,ConnectionExceptionProblem,DisallowedResourceProblem,DuplicateRuleProblem,FieldUnauthorizedProblem,GenericProblem,InvalidRequestProblem,InvalidRuleProblem,NonCompliantRulesProblem,OperationalDisconnectProblem,ResourceNotFoundProblem,ResourceUnauthorizedProblem,ResourceUnavailableProblem,RulesCapProblem,UnsupportedAuthenticationProblem,UsageCapExceededProblem
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Problem extends ObjectAn HTTP Problem Details object, as defined in IETF RFC 7807 (https://tools.ietf.org/html/rfc7807).
-
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_DETAILstatic StringSERIALIZED_NAME_STATUSstatic StringSERIALIZED_NAME_TITLEstatic StringSERIALIZED_NAME_TYPEprotected Stringtype
-
Constructor Summary
Constructors Constructor Description Problem()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Problemdetail(String detail)booleanequals(Object o)static ProblemfromJson(String jsonString)Create an instance of Problem given an JSON stringStringgetDetail()Get detailIntegergetStatus()Get statusStringgetTitle()Get titleStringgetType()Get typeinthashCode()voidsetDetail(String detail)voidsetStatus(Integer status)voidsetTitle(String title)voidsetType(String type)Problemstatus(Integer status)Problemtitle(String title)StringtoJson()Convert an instance of Problem to an JSON stringStringtoString()Problemtype(String type)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
type
@SerializedName("type") protected String type
-
SERIALIZED_NAME_TITLE
public static final String SERIALIZED_NAME_TITLE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DETAIL
public static final String SERIALIZED_NAME_DETAIL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATUS
public static final String SERIALIZED_NAME_STATUS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
@Nonnull public String getType()
Get type- Returns:
- type
-
setType
public void setType(String type)
-
getTitle
@Nonnull public String getTitle()
Get title- Returns:
- title
-
setTitle
public void setTitle(String title)
-
getDetail
@Nullable public String getDetail()
Get detail- Returns:
- detail
-
setDetail
public void setDetail(String detail)
-
getStatus
@Nullable public Integer getStatus()
Get status- Returns:
- status
-
setStatus
public void setStatus(Integer status)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to Problem
-
fromJson
public static Problem fromJson(String jsonString) throws IOException
Create an instance of Problem given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Problem
- Throws:
IOException- if the JSON string is invalid with respect to Problem
-
toJson
public String toJson()
Convert an instance of Problem to an JSON string- Returns:
- JSON string
-
-