Package dev.vality.damsel.domain
Class Failure
java.lang.Object
dev.vality.damsel.domain.Failure
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Failure>,org.apache.thrift.TBase<Failure,,Failure._Fields> org.apache.thrift.TSerializable
@Generated(value="Autogenerated by Thrift Compiler (0.19.0)",
date="2024-08-02")
public class Failure
extends Object
implements org.apache.thrift.TBase<Failure,Failure._Fields>, Serializable, Cloneable, Comparable<Failure>
"Динамическое" представление ошибки,
должно использоваться только для передачи,
для интерпретации нужно использовать конвертацию в типизированный вид.
Если при попытке интерпретировать код через типизированный вид происходит ошибка (нет такого типа),
то это означает, что ошибка неизвестна, и такую ситуацию нужно уметь обрабатывать
(например просто отдать неизветсную ошибку наверх).
Старые ошибки совместимы с новыми и будут читаться.
Структура осталась та же, только поле description переименовалось в reason,
и добавилось поле sub.
В результате для старых ошибок description будет в reason, а в code будет код ошибки
(который будет интропретирован как неизвестная ошибка).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe set of fields this struct contains, along with convenience methods for finding and manipulating them. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<Failure._Fields,org.apache.thrift.meta_data.FieldMetaData> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()intdeepCopy()booleanbooleanfieldForId(int fieldId) getCode()Map<Failure._Fields,org.apache.thrift.meta_data.FieldMetaData> getFieldValue(Failure._Fields field) getSub()inthashCode()booleanisSet(Failure._Fields field) Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwisebooleanReturns true if field code is set (has been assigned a value) and false otherwisebooleanReturns true if field reason is set (has been assigned a value) and false otherwisebooleanisSetSub()Returns true if field sub is set (has been assigned a value) and false otherwisevoidread(org.apache.thrift.protocol.TProtocol iprot) voidsetCodeIsSet(boolean value) voidsetFieldValue(Failure._Fields field, Object value) voidsetReasonIsSet(boolean value) setSub(SubFailure sub) voidsetSubIsSet(boolean value) toString()voidvoidvoidunsetSub()voidvalidate()voidwrite(org.apache.thrift.protocol.TProtocol oprot)
-
Field Details
-
code
-
reason
-
sub
-
metaDataMap
-
-
Constructor Details
-
Failure
public Failure() -
Failure
-
Failure
Performs a deep copy on other.
-
-
Method Details
-
deepCopy
- Specified by:
deepCopyin interfaceorg.apache.thrift.TBase<Failure,Failure._Fields>
-
clear
public void clear()- Specified by:
clearin interfaceorg.apache.thrift.TBase<Failure,Failure._Fields>
-
getCode
-
setCode
-
unsetCode
public void unsetCode() -
isSetCode
public boolean isSetCode()Returns true if field code is set (has been assigned a value) and false otherwise -
setCodeIsSet
public void setCodeIsSet(boolean value) -
getReason
-
setReason
-
unsetReason
public void unsetReason() -
isSetReason
public boolean isSetReason()Returns true if field reason is set (has been assigned a value) and false otherwise -
setReasonIsSet
public void setReasonIsSet(boolean value) -
getSub
-
setSub
-
unsetSub
public void unsetSub() -
isSetSub
public boolean isSetSub()Returns true if field sub is set (has been assigned a value) and false otherwise -
setSubIsSet
public void setSubIsSet(boolean value) -
setFieldValue
- Specified by:
setFieldValuein interfaceorg.apache.thrift.TBase<Failure,Failure._Fields>
-
getFieldValue
- Specified by:
getFieldValuein interfaceorg.apache.thrift.TBase<Failure,Failure._Fields>
-
isSet
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise- Specified by:
isSetin interfaceorg.apache.thrift.TBase<Failure,Failure._Fields>
-
equals
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<Failure>
-
fieldForId
- Specified by:
fieldForIdin interfaceorg.apache.thrift.TBase<Failure,Failure._Fields>
-
getFields
- Specified by:
getFieldsin interfaceorg.apache.thrift.TBase<Failure,Failure._Fields>
-
getFieldMetaData
- Specified by:
getFieldMetaDatain interfaceorg.apache.thrift.TBase<Failure,Failure._Fields>
-
read
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException - Specified by:
readin interfaceorg.apache.thrift.TSerializable- Throws:
org.apache.thrift.TException
-
write
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException - Specified by:
writein interfaceorg.apache.thrift.TSerializable- Throws:
org.apache.thrift.TException
-
toString
-
validate
public void validate() throws org.apache.thrift.TException- Throws:
org.apache.thrift.TException
-