Package dev.vality.damsel.limiter.config
Class LimitConfig
java.lang.Object
dev.vality.damsel.limiter.config.LimitConfig
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<LimitConfig>,org.apache.thrift.TBase<LimitConfig,,LimitConfig._Fields> org.apache.thrift.TSerializable
@Generated(value="Autogenerated by Thrift Compiler (0.19.0)",
date="2024-08-02")
public class LimitConfig
extends Object
implements org.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>, Serializable, Cloneable, Comparable<LimitConfig>
- 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 TypeFieldDescriptionConvert operation's amount if its context currency differs from limit-turnover metric (see `LimitTurnoverAmount`).static final Map<LimitConfig._Fields,org.apache.thrift.meta_data.FieldMetaData> long -
Constructor Summary
ConstructorsConstructorDescriptionLimitConfig(LimitConfig other) Performs a deep copy on other.LimitConfig(String processor_type, String created_at, String started_at, long shard_size, TimeRangeType time_range_type, LimitContextType context_type) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToScopes(LimitScopeType elem) voidclear()intcompareTo(LimitConfig other) deepCopy()booleanequals(LimitConfig that) booleanfieldForId(int fieldId) Convert operation's amount if its context currency differs from limit-turnover metric (see `LimitTurnoverAmount`).Map<LimitConfig._Fields,org.apache.thrift.meta_data.FieldMetaData> getFieldValue(LimitConfig._Fields field) intlonggetType()inthashCode()booleanisSet(LimitConfig._Fields field) Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwisebooleanReturns true if field context_type is set (has been assigned a value) and false otherwisebooleanReturns true if field created_at is set (has been assigned a value) and false otherwisebooleanReturns true if field currency_conversion is set (has been assigned a value) and false otherwisebooleanReturns true if field description is set (has been assigned a value) and false otherwisebooleanReturns true if field op_behaviour is set (has been assigned a value) and false otherwisebooleanReturns true if field processor_type is set (has been assigned a value) and false otherwisebooleanReturns true if field scopes is set (has been assigned a value) and false otherwisebooleanReturns true if field shard_size is set (has been assigned a value) and false otherwisebooleanReturns true if field started_at is set (has been assigned a value) and false otherwisebooleanReturns true if field time_range_type is set (has been assigned a value) and false otherwisebooleanReturns true if field type is set (has been assigned a value) and false otherwisevoidread(org.apache.thrift.protocol.TProtocol iprot) setContextType(LimitContextType context_type) voidsetContextTypeIsSet(boolean value) setCreatedAt(String created_at) voidsetCreatedAtIsSet(boolean value) setCurrencyConversion(CurrencyConversion currency_conversion) Convert operation's amount if its context currency differs from limit-turnover metric (see `LimitTurnoverAmount`).voidsetCurrencyConversionIsSet(boolean value) setDescription(String description) voidsetDescriptionIsSet(boolean value) voidsetFieldValue(LimitConfig._Fields field, Object value) setOpBehaviour(OperationLimitBehaviour op_behaviour) voidsetOpBehaviourIsSet(boolean value) setProcessorType(String processor_type) voidsetProcessorTypeIsSet(boolean value) setScopes(Set<LimitScopeType> scopes) voidsetScopesIsSet(boolean value) setShardSize(long shard_size) voidsetShardSizeIsSet(boolean value) setStartedAt(String started_at) voidsetStartedAtIsSet(boolean value) setTimeRangeType(TimeRangeType time_range_type) voidsetTimeRangeTypeIsSet(boolean value) voidsetTypeIsSet(boolean value) toString()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvalidate()voidwrite(org.apache.thrift.protocol.TProtocol oprot)
-
Field Details
-
processor_type
-
created_at
-
started_at
-
shard_size
public long shard_size -
time_range_type
-
context_type
-
type
-
scopes
-
description
-
op_behaviour
-
currency_conversion
Convert operation's amount if its context currency differs from limit-turnover metric (see `LimitTurnoverAmount`). If undefined and currency codes do not match, then limiter throws `InvalidOperationCurrency` exception (see limiter-proto). -
metaDataMap
-
-
Constructor Details
-
LimitConfig
public LimitConfig() -
LimitConfig
public LimitConfig(String processor_type, String created_at, String started_at, long shard_size, TimeRangeType time_range_type, LimitContextType context_type) -
LimitConfig
Performs a deep copy on other.
-
-
Method Details
-
deepCopy
- Specified by:
deepCopyin interfaceorg.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
-
clear
public void clear()- Specified by:
clearin interfaceorg.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
-
getProcessorType
-
setProcessorType
-
unsetProcessorType
public void unsetProcessorType() -
isSetProcessorType
public boolean isSetProcessorType()Returns true if field processor_type is set (has been assigned a value) and false otherwise -
setProcessorTypeIsSet
public void setProcessorTypeIsSet(boolean value) -
getCreatedAt
-
setCreatedAt
-
unsetCreatedAt
public void unsetCreatedAt() -
isSetCreatedAt
public boolean isSetCreatedAt()Returns true if field created_at is set (has been assigned a value) and false otherwise -
setCreatedAtIsSet
public void setCreatedAtIsSet(boolean value) -
getStartedAt
-
setStartedAt
-
unsetStartedAt
public void unsetStartedAt() -
isSetStartedAt
public boolean isSetStartedAt()Returns true if field started_at is set (has been assigned a value) and false otherwise -
setStartedAtIsSet
public void setStartedAtIsSet(boolean value) -
getShardSize
public long getShardSize() -
setShardSize
-
unsetShardSize
public void unsetShardSize() -
isSetShardSize
public boolean isSetShardSize()Returns true if field shard_size is set (has been assigned a value) and false otherwise -
setShardSizeIsSet
public void setShardSizeIsSet(boolean value) -
getTimeRangeType
-
setTimeRangeType
-
unsetTimeRangeType
public void unsetTimeRangeType() -
isSetTimeRangeType
public boolean isSetTimeRangeType()Returns true if field time_range_type is set (has been assigned a value) and false otherwise -
setTimeRangeTypeIsSet
public void setTimeRangeTypeIsSet(boolean value) -
getContextType
-
setContextType
-
unsetContextType
public void unsetContextType() -
isSetContextType
public boolean isSetContextType()Returns true if field context_type is set (has been assigned a value) and false otherwise -
setContextTypeIsSet
public void setContextTypeIsSet(boolean value) -
getType
-
setType
-
unsetType
public void unsetType() -
isSetType
public boolean isSetType()Returns true if field type is set (has been assigned a value) and false otherwise -
setTypeIsSet
public void setTypeIsSet(boolean value) -
getScopesSize
public int getScopesSize() -
getScopesIterator
-
addToScopes
-
getScopes
-
setScopes
-
unsetScopes
public void unsetScopes() -
isSetScopes
public boolean isSetScopes()Returns true if field scopes is set (has been assigned a value) and false otherwise -
setScopesIsSet
public void setScopesIsSet(boolean value) -
getDescription
-
setDescription
-
unsetDescription
public void unsetDescription() -
isSetDescription
public boolean isSetDescription()Returns true if field description is set (has been assigned a value) and false otherwise -
setDescriptionIsSet
public void setDescriptionIsSet(boolean value) -
getOpBehaviour
-
setOpBehaviour
-
unsetOpBehaviour
public void unsetOpBehaviour() -
isSetOpBehaviour
public boolean isSetOpBehaviour()Returns true if field op_behaviour is set (has been assigned a value) and false otherwise -
setOpBehaviourIsSet
public void setOpBehaviourIsSet(boolean value) -
getCurrencyConversion
Convert operation's amount if its context currency differs from limit-turnover metric (see `LimitTurnoverAmount`). If undefined and currency codes do not match, then limiter throws `InvalidOperationCurrency` exception (see limiter-proto). -
setCurrencyConversion
Convert operation's amount if its context currency differs from limit-turnover metric (see `LimitTurnoverAmount`). If undefined and currency codes do not match, then limiter throws `InvalidOperationCurrency` exception (see limiter-proto). -
unsetCurrencyConversion
public void unsetCurrencyConversion() -
isSetCurrencyConversion
public boolean isSetCurrencyConversion()Returns true if field currency_conversion is set (has been assigned a value) and false otherwise -
setCurrencyConversionIsSet
public void setCurrencyConversionIsSet(boolean value) -
setFieldValue
- Specified by:
setFieldValuein interfaceorg.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
-
getFieldValue
- Specified by:
getFieldValuein interfaceorg.apache.thrift.TBase<LimitConfig,LimitConfig._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<LimitConfig,LimitConfig._Fields>
-
equals
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<LimitConfig>
-
fieldForId
- Specified by:
fieldForIdin interfaceorg.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
-
getFields
- Specified by:
getFieldsin interfaceorg.apache.thrift.TBase<LimitConfig,LimitConfig._Fields>
-
getFieldMetaData
- Specified by:
getFieldMetaDatain interfaceorg.apache.thrift.TBase<LimitConfig,LimitConfig._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
-