Class HttpJsonStatusCode (2.49.0)

publicclass HttpJsonStatusCodeimplementsStatusCode

A failure code specific to an HTTP call.

Inheritance

Object > HttpJsonStatusCode

Implements

StatusCode

Static Methods

of(StatusCode.Code statusCode)

publicstaticHttpJsonStatusCodeof(StatusCode.CodestatusCode)
Parameter
Name Description
statusCode StatusCode.Code
Returns
Type Description
HttpJsonStatusCode

of(Code rpcCode)

publicstaticHttpJsonStatusCodeof(CoderpcCode)
Parameter
Name Description
rpcCode com.google.rpc.Code
Returns
Type Description
HttpJsonStatusCode

of(int httpStatus)

publicstaticHttpJsonStatusCodeof(inthttpStatus)

Creates a new instance with the given status code.

Parameter
Name Description
httpStatus int
Returns
Type Description
HttpJsonStatusCode

Methods

equals(Object o)

publicbooleanequals(Objecto)
Parameter
Name Description
o Object
Returns
Type Description
boolean
Overrides

getCode()

publicStatusCode.CodegetCode()

Return the code enum value.

Returns
Type Description
StatusCode.Code

getTransportCode()

publicIntegergetTransportCode()

Returns the status code from the http call.

Returns
Type Description
Integer

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

toString()

publicStringtoString()
Returns
Type Description
String
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.