Package net.morimekta.providence.server
Class ProvidenceHttpError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- net.morimekta.providence.server.ProvidenceHttpError
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ProvidenceHttpError>
,PException
,PMessage<ProvidenceHttpError>
,PMessageOrBuilder<ProvidenceHttpError>
,PValue<ProvidenceHttpError>
,BinaryWriter
,ProvidenceHttpError_OrBuilder
,net.morimekta.util.Stringable
@Generated(value="net.morimekta.providence:providence-generator-java", comments="java:serializable") @Immutable public class ProvidenceHttpError extends java.lang.Exception implements ProvidenceHttpError_OrBuilder, PMessage<ProvidenceHttpError>, PException, java.lang.Comparable<ProvidenceHttpError>, BinaryWriter
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProvidenceHttpError._Builder
static class
ProvidenceHttpError._Field
-
Field Summary
Fields Modifier and Type Field Description static PExceptionDescriptor<ProvidenceHttpError>
kDescriptor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
asString()
Pure string representation of content.static ProvidenceHttpError._Builder
builder()
Make ap_http.ProvidenceHttpError
builder.int
compareTo(ProvidenceHttpError other)
PExceptionDescriptor<ProvidenceHttpError>
descriptor()
boolean
equals(java.lang.Object o)
ProvidenceHttpError
fillInStackTrace()
<T> T
get(int key)
java.lang.String
getMessage()
int
getStatusCode()
boolean
has(int key)
int
hashCode()
boolean
hasMessage()
boolean
hasStatusCode()
ProvidenceHttpError
initCause(java.lang.Throwable cause)
ProvidenceHttpError._Builder
mutate()
Get a builder that extends the current object.java.util.Optional<java.lang.String>
optionalMessage()
java.util.Optional<java.lang.Integer>
optionalStatusCode()
java.lang.String
origGetLocalizedMessage()
Get the original message from the actual exception.java.lang.String
origGetMessage()
Get the original message from the actual exception.static PExceptionDescriptorProvider<ProvidenceHttpError>
provider()
java.lang.String
toString()
int
writeBinary(net.morimekta.util.io.BigEndianBinaryWriter writer)
Write the current message to the binary writer.-
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.morimekta.providence.PMessageOrBuilder
toBuilder, toMessage
-
-
-
-
Field Detail
-
kDescriptor
public static final PExceptionDescriptor<ProvidenceHttpError> kDescriptor
-
-
Method Detail
-
hasMessage
public boolean hasMessage()
- Specified by:
hasMessage
in interfaceProvidenceHttpError_OrBuilder
- Returns:
- If message is present.
-
getMessage
public java.lang.String getMessage()
- Specified by:
getMessage
in interfaceProvidenceHttpError_OrBuilder
- Overrides:
getMessage
in classjava.lang.Throwable
- Returns:
- The
message
value
-
optionalMessage
@Nonnull public java.util.Optional<java.lang.String> optionalMessage()
- Specified by:
optionalMessage
in interfaceProvidenceHttpError_OrBuilder
- Returns:
- Optional of the
message
field value.
-
hasStatusCode
public boolean hasStatusCode()
- Specified by:
hasStatusCode
in interfaceProvidenceHttpError_OrBuilder
- Returns:
- If status_code is present.
-
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCode
in interfaceProvidenceHttpError_OrBuilder
- Returns:
- The
status_code
value
-
optionalStatusCode
@Nonnull public java.util.Optional<java.lang.Integer> optionalStatusCode()
- Specified by:
optionalStatusCode
in interfaceProvidenceHttpError_OrBuilder
- Returns:
- Optional of the
status_code
field value.
-
has
public boolean has(int key)
- Specified by:
has
in interfacePMessageOrBuilder<ProvidenceHttpError>
- Parameters:
key
- The key of the field.- Returns:
- Whether the field is present.
-
get
public <T> T get(int key)
- Specified by:
get
in interfacePMessageOrBuilder<ProvidenceHttpError>
- Type Parameters:
T
- The return type.- Parameters:
key
- The key of the field.- Returns:
- The value of the field.
-
origGetMessage
public java.lang.String origGetMessage()
Description copied from interface:PException
Get the original message from the actual exception.- Specified by:
origGetMessage
in interfacePException
- Returns:
- The original message.
-
origGetLocalizedMessage
public java.lang.String origGetLocalizedMessage()
Description copied from interface:PException
Get the original message from the actual exception.- Specified by:
origGetLocalizedMessage
in interfacePException
- Returns:
- The original message.
-
initCause
public ProvidenceHttpError initCause(java.lang.Throwable cause)
- Overrides:
initCause
in classjava.lang.Throwable
-
fillInStackTrace
public ProvidenceHttpError fillInStackTrace()
- Overrides:
fillInStackTrace
in classjava.lang.Throwable
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Throwable
-
asString
@Nonnull public java.lang.String asString()
Description copied from interface:PMessage
Pure string representation of content. Does not contain type info.- Specified by:
asString
in interfacePMessage<ProvidenceHttpError>
- Specified by:
asString
in interfacenet.morimekta.util.Stringable
- Returns:
- String representation.
-
compareTo
public int compareTo(ProvidenceHttpError other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ProvidenceHttpError>
-
writeBinary
public int writeBinary(net.morimekta.util.io.BigEndianBinaryWriter writer) throws java.io.IOException
Description copied from interface:BinaryWriter
Write the current message to the binary writer. NOTE: This method is not intended to be used directly. Instead use theBinarySerializer.serialize(OutputStream, PMessageOrBuilder)
call.- Specified by:
writeBinary
in interfaceBinaryWriter
- Parameters:
writer
- The binary writer to write to.- Returns:
- The number of bytes written.
- Throws:
java.io.IOException
- If it failed to write the message for any reason.
-
mutate
@Nonnull public ProvidenceHttpError._Builder mutate()
Description copied from interface:PMessage
Get a builder that extends the current object.- Specified by:
mutate
in interfacePMessage<ProvidenceHttpError>
- Returns:
- The builder instance.
-
provider
@Nonnull public static PExceptionDescriptorProvider<ProvidenceHttpError> provider()
-
descriptor
@Nonnull public PExceptionDescriptor<ProvidenceHttpError> descriptor()
- Specified by:
descriptor
in interfacePMessageOrBuilder<ProvidenceHttpError>
- Specified by:
descriptor
in interfacePValue<ProvidenceHttpError>
-
builder
public static ProvidenceHttpError._Builder builder()
Make ap_http.ProvidenceHttpError
builder.- Returns:
- The builder instance.
-
-