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 Object
An 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>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_DETAIL
static String
SERIALIZED_NAME_STATUS
static String
SERIALIZED_NAME_TITLE
static String
SERIALIZED_NAME_TYPE
protected String
type
-
Constructor Summary
Constructors Constructor Description Problem()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Problem
detail(String detail)
boolean
equals(Object o)
static Problem
fromJson(String jsonString)
Create an instance of Problem given an JSON stringString
getDetail()
Get detailInteger
getStatus()
Get statusString
getTitle()
Get titleString
getType()
Get typeint
hashCode()
void
setDetail(String detail)
void
setStatus(Integer status)
void
setTitle(String title)
void
setType(String type)
Problem
status(Integer status)
Problem
title(String title)
String
toJson()
Convert an instance of Problem to an JSON stringString
toString()
Problem
type(String type)
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
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
-
SERIALIZED_NAME_TITLE
public static final String SERIALIZED_NAME_TITLE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
type
@SerializedName("type") protected String type
-
-
Method Detail
-
setDetail
public void setDetail(String detail)
-
setStatus
public void setStatus(Integer status)
-
setTitle
public void setTitle(String title)
-
setType
public void setType(String type)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
Validates 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
-
-